:root {
  --bg: #f0f0f0;
  --surface: #ffffff;
  --surface2: #e8e8e8;
  --border: #d4d4d4;
  --border2: #bebebe;
  --text: #111111;
  --muted: #777777;
  --accent: #222222;
  --accent2: #000000;
  --accent-glow: rgba(0, 0, 0, 0.06);
  --green: #1e8a4c;
  --yellow: #a07c10;
  --red: #9b2c2c;
  --orange: #8c4a1a;
  --cyan: #2a6f80;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --shadow-accent: 0 0 0 1px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── NAV ── */
#navbar {
  background: rgba(240,240,240,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  min-width: 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.logo-img {
  height: 36px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
  padding-left: 16px;
}
.nav-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.nav-btn:hover, .nav-btn.active {
  color: var(--text);
  background: var(--surface2);
}
.nav-right { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: nowrap; flex-shrink: 0; }
.nav-right > * { flex-shrink: 0; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent2);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}
.btn-ghost {
  background: none;
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent2); }
.btn-sm { padding: 5px 14px; font-size: 13px; }
/* Project share bar — tight, borderless inner buttons */
.share-bar .share-btn {
  border: none !important;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.share-bar .share-btn:hover { color: var(--accent2); background: var(--card); }
.btn-danger {
  color: #ff6b6b;
  border-color: rgba(255,107,107,0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-danger:hover {
  border-color: #ff6b6b;
  color: #fff;
  background: rgba(255,107,107,0.12);
}
.full-width { width: 100%; margin-top: 8px; padding: 12px; font-size: 15px; }

/* ── MAIN ── */
#app { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 64px 0 48px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%; transform: translateX(-50%);
  width: min(600px, 100%); height: 400px;
  max-width: 100%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* Global media safety net — nothing wider than its container on any viewport */
img, video, canvas, iframe { max-width: 100%; height: auto; }
pre, code { max-width: 100%; overflow-x: auto; word-wrap: break-word; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  color: var(--accent2);
}
.hero h1 span {
  color: var(--accent2);
  border-bottom: 3px solid var(--border2);
  padding-bottom: 2px;
}
.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 520px;
  margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-primary { padding: 12px 28px; font-size: 16px; }
.hero-actions .btn-ghost { padding: 12px 28px; font-size: 16px; }

/* ── STATS BAR ── */
.stats-bar {
  display: flex;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 48px;
}
.stat-item {
  flex: 1;
  background: var(--surface);
  padding: 20px 24px;
  text-align: center;
}
.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent2);
  letter-spacing: -1px;
}
.stat-label { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── SECTION HEADERS ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.section-title span { color: var(--accent2); }
.see-all { color: var(--muted); font-size: 14px; cursor: pointer; text-decoration: none; }
.see-all:hover { color: var(--text); text-decoration: underline; }

/* ── CHALLENGE BANNER ── */
.challenge-banner {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  cursor: pointer;
  transition: all 0.2s;
}
.challenge-banner:hover { border-color: var(--accent); box-shadow: var(--shadow-accent); }
.challenge-icon { font-size: 40px; flex-shrink: 0; }
.challenge-info { flex: 1; }
.challenge-info h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.challenge-info p { color: var(--muted); font-size: 14px; }
.challenge-badge {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  flex-shrink: 0;
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-chip:hover, .filter-chip.active {
  border-color: var(--border2);
  color: var(--accent2);
  background: var(--surface2);
}
.search-input {
  background: #f8f9fb;
  border: 1.5px solid #dde1e7;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 7px 16px;
  border-radius: 100px;
  outline: none;
  width: 220px;
  margin-left: auto;
  transition: border-color 0.15s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--border2); }

/* ── PROJECT GRID ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.project-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
}

/* ── CARD THUMBNAIL ── */
.card-thumb {
  height: 180px;
  background: var(--surface2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.thumb-placeholder {
  font-size: 56px;
  font-weight: 800;
  color: var(--border2);
  text-transform: uppercase;
  user-select: none;
}
.card-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 9px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}
.card-steps-badge {
  position: absolute;
  bottom: 10px; left: 10px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.project-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 100px;
}
.cat-robotics  { background: var(--surface2); color: var(--accent2); border: 1px solid var(--border2); }
.cat-electronics { background: var(--surface2); color: var(--accent);  border: 1px solid var(--border2); }
.cat-iot       { background: var(--surface2); color: var(--accent2); border: 1px solid var(--border2); }
.cat-3dprinting{ background: var(--surface2); color: var(--accent);  border: 1px solid var(--border2); }
.cat-other     { background: var(--surface2); color: var(--muted);   border: 1px solid var(--border); }
.project-version {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface2);
  padding: 3px 10px;
  border-radius: 100px;
}
.project-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.project-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.meta-item { display: flex; align-items: center; gap: 4px; }
.difficulty-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.diff-beginner    { background: var(--green); }
.diff-intermediate{ background: var(--yellow); }
.diff-advanced    { background: var(--red); }
.inventor-link { color: var(--accent); font-weight: 600; margin-left: auto; }
.inventor-link:hover { color: var(--accent2); }

/* ── PROJECT PAGE ── */
.project-page { max-width: 860px; margin: 0 auto; }
.project-page-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.back-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.back-btn:hover { color: var(--text); border-color: var(--border2); }
.project-page-title { font-size: 32px; font-weight: 800; letter-spacing: -0.8px; }
.project-page-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }

.inventor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.inventor-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
  color: var(--accent2);
}
.inventor-info small { color: var(--muted); font-size: 12px; }
.inventor-info strong { display: block; font-size: 15px; cursor: pointer; }
.inventor-info strong:hover { color: var(--accent2); }

.version-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  width: fit-content;
}
.version-tab {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.version-tab.active { background: var(--surface2); color: var(--accent2); border: 1px solid var(--border2); }

.steps-container { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 16px;
}
.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--accent2);
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-content h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.step-content p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.step-img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  border: 1px solid var(--border);
}

.components-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.components-list h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.component-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.component-item:last-child { border-bottom: none; }
.component-item::before { content: '◈'; color: var(--border2); font-size: 10px; }

.build-panel {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}
.build-panel h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.build-panel p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.xp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  margin-right: 8px;
  white-space: nowrap;
}

/* ── Level & Streak Pills ── */
.level-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2px;
  padding: 3px 10px;
  border-radius: 100px;
  margin-right: 8px;
  white-space: nowrap;
  border: 1px solid;
  text-transform: uppercase;
}
.level-pill.tier-bronze    { background: rgba(205,127,50,.10);  border-color: rgba(205,127,50,.45);  color: #d89054; }
.level-pill.tier-silver    { background: rgba(192,192,192,.10); border-color: rgba(192,192,192,.45); color: #cfd0d1; }
.level-pill.tier-gold      { background: rgba(255,193,7,.10);   border-color: rgba(255,193,7,.45);   color: #f5c543; }
.level-pill.tier-platinum  { background: rgba(129,211,255,.10); border-color: rgba(129,211,255,.45); color: #8fd3ff; }
.level-pill.tier-legendary { background: rgba(186,104,255,.12); border-color: rgba(186,104,255,.55); color: #c58bff; box-shadow: 0 0 10px rgba(186,104,255,.20); }

.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
  margin-right: 8px;
  white-space: nowrap;
  background: rgba(255,120,60,.10);
  border: 1px solid rgba(255,120,60,.45);
  color: #ff8a50;
}

/* ── Level Card (profile) ── */
.level-card {
  border: 1px solid var(--border2);
  background: var(--surface2);
  border-radius: 12px;
  padding: 12px 14px;
}
.level-card.tier-bronze    { border-color: rgba(205,127,50,.45); }
.level-card.tier-silver    { border-color: rgba(192,192,192,.45); }
.level-card.tier-gold      { border-color: rgba(255,193,7,.45); }
.level-card.tier-platinum  { border-color: rgba(129,211,255,.45); }
.level-card.tier-legendary { border-color: rgba(186,104,255,.55); box-shadow: 0 0 14px rgba(186,104,255,.15); }
.level-card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.level-card-level { font-size: 22px; font-weight: 900; letter-spacing: .5px; }
.level-card-name { font-size: 15px; font-weight: 700; color: var(--text); }
.level-card.tier-bronze    .level-card-name { color: #d89054; }
.level-card.tier-silver    .level-card-name { color: #cfd0d1; }
.level-card.tier-gold      .level-card-name { color: #f5c543; }
.level-card.tier-platinum  .level-card-name { color: #8fd3ff; }
.level-card.tier-legendary .level-card-name { color: #c58bff; }
.level-card-xp { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.level-card-bar { height: 8px; background: var(--surface); border-radius: 100px; margin-top: 10px; overflow: hidden; }
.level-card-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #8affb1); border-radius: 100px; transition: width .4s; }
.level-card-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ── Bookmark Button ── */
.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.bookmark-btn:hover { border-color: var(--accent); color: var(--accent); }
.bookmark-btn:disabled { opacity: .6; cursor: not-allowed; }
.bookmark-btn.is-on {
  border-color: var(--accent);
  background: rgba(34,197,94,.10);
  color: var(--accent);
}

/* ── Follow Button + List ── */
.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #0d0d0d;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.follow-btn:hover { background: transparent; color: var(--accent); }
.follow-btn:disabled { opacity: .6; cursor: not-allowed; }
.follow-btn.is-following {
  background: transparent;
  color: var(--accent);
  border-color: var(--border2);
}
.follow-btn.is-following:hover {
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.45);
  color: #ef6c6c;
}
.follow-btn.is-following:hover::before {
  content: "";
}
.follow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.follow-row:hover { background: var(--surface2); }
.follow-row:last-child { border-bottom: none; }
.follow-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.follow-name { font-weight: 700; }

/* ── Activity Feed ── */
.feed-list { display: flex; flex-direction: column; gap: 10px; }
.feed-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s;
}
.feed-item:hover { border-color: var(--accent); }
.feed-icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 50%;
  color: var(--accent);
}
.feed-body { flex: 1; min-width: 0; }
.feed-text { font-size: 14px; line-height: 1.5; color: var(--text); }
.feed-text strong { color: var(--accent); font-weight: 700; }
.feed-text strong:hover { text-decoration: underline; }
.feed-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ── Marketplace ── */
.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.reward-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, border-color .15s;
}
.reward-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.reward-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--surface2);
}
.reward-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.reward-name { font-weight: 600; font-size: 15px; }
.reward-desc {
  font-size: 13px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.reward-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.reward-btn { width: 100%; margin-top: 4px; }
.reward-btn:disabled { opacity: .55; cursor: not-allowed; filter: grayscale(.5); }
.stock-pill {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 100px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border2);
}
.stock-pill.low { color: #f59e0b; border-color: #f59e0b55; }
.stock-pill.out { color: #ef4444; border-color: #ef444455; }
.store-cat-btn.active { border-color: var(--accent); color: var(--accent2); background: var(--surface2); }

.builders-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.builders-list h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.builder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.builder-item:last-child { border-bottom: none; }
.builder-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: auto;
}
.status-making   { background: var(--surface2); color: var(--yellow); border: 1px solid var(--border); }
.status-completed{ background: var(--surface2); color: var(--green);  border: 1px solid var(--border); }

/* ── LEADERBOARD ── */
.leaderboard-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
}
.lb-row {
  display: grid;
  grid-template-columns: 48px 1fr 80px 80px 80px 100px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
  gap: 8px;
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--surface2); }
.lb-header {
  background: var(--surface2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: default;
}
.lb-header:hover { background: var(--surface2); }
.lb-rank { font-size: 18px; font-weight: 800; text-align: center; }
.rank-1 { color: #d4af37; }
.rank-2 { color: #a8a8a8; }
.rank-3 { color: #8b6340; }
.lb-user { display: flex; align-items: center; gap: 10px; }
.lb-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
  color: var(--accent2);
}
.lb-num { font-size: 15px; font-weight: 700; text-align: center; }
.xp-bar-container { position: relative; }
.xp-bar-bg {
  background: var(--surface2);
  border-radius: 100px;
  height: 6px;
  width: 80px;
  overflow: hidden;
}
.xp-bar-fill {
  background: var(--accent);
  height: 100%;
  border-radius: 100px;
  transition: width 0.8s ease;
}

/* ── PROFILE ── */
.profile-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800;
  flex-shrink: 0;
  color: var(--accent2);
  position: relative;
  overflow: visible;
}
.profile-avatar-edit {
  position: absolute; right: -4px; bottom: -4px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; border: 2px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 12px -2px rgba(0,0,0,.35);
  transition: transform .15s ease;
}
.profile-avatar-edit:hover { transform: scale(1.08); }
.profile-info h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.profile-info p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.xp-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.xp-number { font-size: 20px; font-weight: 800; color: var(--accent2); }
.xp-label { font-size: 13px; color: var(--muted); }
.profile-xp-bar {
  background: var(--surface2);
  border-radius: 100px;
  height: 8px;
  width: 200px;
  overflow: hidden;
}
.profile-xp-fill {
  background: var(--accent);
  height: 100%;
  border-radius: 100px;
}
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  margin-top: 8px;
}

.badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.badge-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}
.badge-item:hover { border-color: var(--border2); background: var(--surface2); }
.badge-icon { font-size: 20px; }

/* ── CHALLENGES PAGE ── */
.challenge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  cursor: pointer;
  transition: all 0.2s;
}
.challenge-card:hover { border-color: var(--border2); box-shadow: var(--shadow-accent); }
.challenge-card.active-challenge { border-color: var(--border2); background: var(--surface2); }
.challenge-card-icon { font-size: 36px; flex-shrink: 0; }
.challenge-card-body { flex: 1; }
.challenge-card-body h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.challenge-card-body p { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.challenge-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.challenge-week { font-size: 12px; color: var(--muted); }
.challenge-entries { font-size: 12px; color: var(--accent); font-weight: 600; }

/* ── COURSES PAGE ── */
.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.course-card:hover { border-color: var(--border2); box-shadow: var(--shadow-accent); }
.course-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.course-card p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.course-parts { display: flex; gap: 8px; flex-wrap: wrap; }
.course-part-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 100px;
}

/* ── MODAL ── */
body.modal-open { overflow: hidden; touch-action: none; }
#modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  z-index: 200;
}
.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 28px;
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 201;
  box-shadow: var(--shadow);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h2 { font-size: 22px; font-weight: 800; }
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.modal-close:hover { color: var(--text); background: var(--surface2); }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 7px;
}

/* ── GLOBAL MODERN INPUTS ── */
input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea,
select {
  width: 100%;
  background: #f8f9fb;
  border: 1.5px solid #dde1e7;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
textarea:hover, select:hover {
  border-color: #c4c9d2;
  background: #f4f6f9;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
select option { background: #ffffff; color: var(--text); }
input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
textarea:focus,
select:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
}
input::placeholder, textarea::placeholder { color: #b0b0b0; font-weight: 400; }
textarea { resize: vertical; min-height: 80px; line-height: 1.55; }

/* Dark code textarea inside step blocks — don't override */
textarea[style*="background:#1a1a2e"],
textarea[style*="background: #1a1a2e"] {
  background: #1a1a2e !important;
  border-color: #333 !important;
  color: #e0e0e0 !important;
  border-radius: 0 !important;
}
/* Transparent textareas inside content blocks */
textarea[style*="background:transparent"],
textarea[style*="background: transparent"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 12px !important;
  border-radius: 0 !important;
}

.form-group select option { background: #ffffff; }
.modal-footer-text { text-align: center; color: var(--muted); font-size: 13px; margin-top: 16px; }
.modal-footer-text a { color: var(--accent); cursor: pointer; }
.modal-footer-text a:hover { text-decoration: underline; color: var(--accent2); }

/* ── OAUTH BUTTONS ── */
.oauth-buttons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid #dde1e7;
  background: #f8f9fb;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  box-sizing: border-box;
}
.btn-oauth:hover {
  background: #f0f2f5;
  border-color: #bbc0ca;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.btn-oauth-github:hover { border-color: #333; }
.btn-oauth-google:hover { border-color: #4285F4; }
.oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  margin: 16px 0 14px;
  text-transform: uppercase;
}
.oauth-divider::before,
.oauth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Wide modal for project submission */
.modal-wide { width: 680px; max-height: 90vh; overflow-y: auto; }

/* ── SUBMIT PROJECT FORM ── */
.steps-editor { display: flex; flex-direction: column; gap: 10px; }
.step-editor {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.step-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.step-editor-num { font-size: 13px; font-weight: 700; color: var(--accent); }
.step-remove {
  background: none; border: none;
  color: var(--muted); font-size: 16px; cursor: pointer;
  padding: 0 4px;
}
.step-remove:hover { color: var(--red); }
.add-step-btn {
  background: var(--surface2);
  border: 1px dashed var(--border2);
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  transition: all 0.15s;
}
.add-step-btn:hover { border-color: var(--accent); color: var(--accent2); }

/* ── TOAST ── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: slideIn 0.2s ease;
  max-width: 320px;
  color: var(--text);
}
.toast.success { border-color: var(--green); }
.toast.error   { border-color: var(--red); }
.toast.info    { border-color: var(--border2); }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; max-width: 320px; margin: 0 auto 20px; }

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: -1px;
}
.tab.active { color: var(--accent2); border-bottom-color: var(--accent2); }
.tab:hover { color: var(--text); }

/* ── ICONS ── */
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-sm { width: 14px; height: 14px; }
.icon-md { width: 18px; height: 18px; }
.icon-lg { width: 22px; height: 22px; }
.icon-xl { width: 32px; height: 32px; }

/* ── UTILITY ── */
.hidden { display: none !important; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.mt-16 { margin-top: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 13px; }
.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ── SUBMIT PAGE ── */
.submit-page { max-width: 780px; margin: 0 auto; }
.submit-page h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.submit-page .page-sub { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.form-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.form-section-num {
  width: 28px; height: 28px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  flex-shrink: 0;
}
.form-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* Cover upload */
.cover-upload-area {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.cover-upload-area:hover { border-color: var(--accent); background: var(--surface2); }
.cover-upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cover-upload-icon { font-size: 32px; margin-bottom: 8px; }
.cover-upload-area p { font-size: 14px; color: var(--muted); }
.cover-upload-area b { color: var(--text); }
.cover-preview-img {
  width: 100%; height: 220px; object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 12px;
  display: none;
}

/* Tags */
.tags-input-container {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: text;
  min-height: 46px;
  transition: border-color 0.15s;
}
.tags-input-container:focus-within { border-color: var(--border2); }
.tag-chip {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  display: flex; align-items: center; gap: 5px;
}
.tag-chip button {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 13px; padding: 0; line-height: 1;
}
.tag-chip button:hover { color: var(--red); }
.tag-real-input {
  border: none; background: none; outline: none;
  font-family: inherit; font-size: 13px; color: var(--text);
  flex: 1; min-width: 80px; padding: 2px 0;
}
.tag-real-input::placeholder { color: var(--muted); }

/* Materials */
.material-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 8px;
}
.material-row input { flex: 1; }
.material-row .mat-link { flex: 1; }
.btn-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.15s;
}
.btn-icon:hover { border-color: var(--red); color: var(--red); }
.btn-add-row {
  width: 100%; padding: 9px;
  background: none;
  border: 1px dashed var(--border2);
  border-radius: var(--radius-sm);
  color: var(--muted); font-family: inherit; font-size: 13px;
  cursor: pointer; margin-top: 4px;
  transition: all 0.15s;
}
.btn-add-row:hover { border-color: var(--accent); color: var(--text); }

/* Step editor */
.step-editor-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}
.step-editor-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.step-editor-head .step-num {
  width: 24px; height: 24px; font-size: 12px;
  background: var(--accent2); color: var(--bg);
}
.step-title-field { flex: 1; }
.step-editor-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.step-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 6px;
}
.step-img-thumb {
  position: relative; aspect-ratio: 1;
  border-radius: 6px; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.step-img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.step-img-thumb .remove-img {
  position: absolute; top: 3px; right: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff;
  border: none; cursor: pointer; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}
.add-img-btn {
  aspect-ratio: 1;
  border: 2px dashed var(--border2);
  border-radius: 6px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted);
  transition: all 0.15s;
  background: var(--surface2);
  font-size: 20px;
  position: relative;
}
.add-img-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.add-img-btn:hover { border-color: var(--accent); color: var(--text); }

/* Cover image banner on project page */
.project-cover-banner {
  width: 100%; height: 300px; object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

/* ── MOBILE MENU ── */
#navbar { position: relative; }
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
  order: 99;          /* sits after .nav-right */
  margin-left: 4px;
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px 16px;
  z-index: 99;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  flex-direction: column;
  gap: 2px;
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-btn {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
}
.mobile-menu-divider { height: 1px; background: var(--border); margin: 8px 0; }
.mobile-menu-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.mobile-menu-actions .btn-primary,
.mobile-menu-actions .btn-ghost { width: 100%; padding: 12px; font-size: 15px; text-align: center; }
.mobile-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--surface2);
  border-radius: 10px;
  margin-bottom: 4px;
}
.mobile-user-row .xp-pill { font-size: 13px; }

/* ── RESPONSIVE: TABLET (≤ 1024px) ── */
@media (max-width: 1024px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }

  /* Navbar collapses to hamburger here so the right-side controls
     (XP, username, admin, logout, +Submit) never wrap or get cut off. */
  .nav-links { display: none; }
  .nav-inner { padding: 0 16px; gap: 10px; }
  .mobile-menu-btn { display: flex; }
  .nav-right .xp-pill { display: none; }
  .nav-right > .btn-ghost { display: none; }
  .nav-right > button[onclick*="navigate('profile"] { display: none; }
  .nav-right > button[onclick*="admin"] { display: none; }
  .nav-right > button[onclick*="Logout"] { display: none; }
}

/* ── RESPONSIVE: TABLET PORTRAIT / LARGE PHONE (≤ 768px) ── */
@media (max-width: 768px) {

  /* App */
  #app { padding: 20px 14px; }

  /* Hero */
  .hero { padding: 36px 8px 28px; }
  .hero h1 { font-size: 2rem; line-height: 1.25; }
  .hero p { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: center; gap: 10px; }
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost { width: 100%; max-width: 300px; padding: 13px 20px; font-size: 15px; }

  /* Stats bar — 2×2 grid */
  .stats-bar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; }

  /* Filter bar — wrap onto multiple rows so nothing gets cut off */
  .filter-bar {
    flex-wrap: wrap;
    gap: 6px 8px;
    padding-bottom: 4px;
  }
  .filter-chip { flex-shrink: 0; padding: 6px 12px; font-size: 12.5px; }

  /* Project grid */
  .project-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Course grid */
  .course-grid { grid-template-columns: 1fr; }

  /* Section header */
  .section-header { flex-wrap: wrap; gap: 12px; }
  .section-title { font-size: 1rem; }

  /* Cards */
  .card-thumb { height: 155px; }
  .card-body { padding: 12px; }
  .card-title { font-size: 14px; }

  /* Modals — centered, full-width with safe-area padding */
  .modal {
    width: calc(100vw - 24px);
    max-width: 460px;
    max-height: calc(100dvh - 24px);
    padding: 22px 22px calc(22px + env(safe-area-inset-bottom, 0));
    border-radius: 16px;
  }
  .modal-wide {
    width: calc(100vw - 16px);
    max-width: 100%;
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }
  #modal-overlay { background: rgba(0,0,0,0.45); backdrop-filter: blur(3px); }

  /* Project page */
  .action-bar { gap: 8px; flex-wrap: wrap; }
  .action-btn { padding: 8px 12px; font-size: 13px; }
  .step-card { gap: 12px; }
  .step-num { width: 28px; height: 28px; font-size: 12px; flex-shrink: 0; }

  /* Submit form */
  .sp-info-grid { grid-template-columns: 1fr 1fr !important; }

  /* Leaderboard */
  .lb-header,
  .lb-row { grid-template-columns: 40px 1fr 80px; }
  .lb-row > *:nth-child(n+4) { display: none; }
  .lb-header > *:nth-child(n+4) { display: none; }

  /* Profile */
  .profile-header { flex-direction: column; align-items: center; text-align: center; }
  .profile-stats { justify-content: center; }
  .profile-badges { justify-content: center; }
  .profile-avatar { margin-right: 0 !important; margin-bottom: 16px !important; }

  /* Step editor */
  .step-gh-file-row { flex-direction: column; }
  .step-gh-file-row input { border-radius: 10px !important; }
  .step-gh-file-row button { border-radius: 10px !important; width: 100%; justify-content: center; }
}

/* ── RESPONSIVE: SMALL PHONE (≤ 480px) ── */
@media (max-width: 480px) {
  /* Nav */
  .nav-inner { height: 56px; }
  .mobile-menu { top: 56px; }
  .logo-img { height: 30px; }
  .nav-right .btn-primary { padding: 7px 14px; font-size: 13px; }

  /* App */
  #app { padding: 14px 12px; }

  /* Hero */
  .hero { padding: 28px 0 20px; }
  .hero h1 { font-size: 1.65rem; }
  .hero-badge { font-size: 11px; padding: 4px 12px; }
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost { max-width: 100%; }

  /* Grids — 1 column */
  .project-grid { grid-template-columns: 1fr; gap: 10px; }
  .course-grid { grid-template-columns: 1fr; }

  /* Stats */
  .stats-bar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .stat-num { font-size: 1.4rem; }

  /* Cards */
  .card-thumb { height: 140px; }

  /* Submit form — 1 column */
  .sp-info-grid { grid-template-columns: 1fr !important; }

  /* Materials */
  .sp-materials-grid { grid-template-columns: 1fr !important; }
  .sp-materials-grid input[placeholder="Price"] { display: none; }
  .sp-materials-grid .btn-ghost { display: block; }

  /* Modals */
  .modal { padding: 18px 16px 28px; }

  /* Buttons touch targets */
  .btn-primary, .btn-ghost { min-height: 44px; }
  .btn-sm { min-height: 36px; }

  /* Challenges */
  .challenge-banner { padding: 16px; }

  /* Comments */
  .comment-form { padding: 12px; }
}

/* ── TOUCH: ensure tap targets ≥ 44px ── */
@media (hover: none) and (pointer: coarse) {
  .nav-btn { min-height: 44px; }
  .filter-chip { min-height: 38px; padding: 8px 16px; }
  .btn-primary, .btn-ghost { min-height: 44px; }
  input, textarea, select { min-height: 44px; }
  textarea { min-height: auto; }
  .action-btn { min-height: 44px; }
}


/* ACTION BUTTONS */
.action-bar { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; align-items: center; }
.action-btn { display: flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); transition: all .2s; font-family: inherit; }
.action-btn:hover { border-color: var(--accent); background: var(--surface2); }
.action-btn.liked { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.action-btn .count { font-size: 12px; font-weight: 800; }
.progress-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 24px; }
.progress-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.progress-header span { font-size: 14px; font-weight: 700; }
.prog-pct { font-size: 13px; color: var(--muted); font-weight: 600; }
.progress-bar-track { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.progress-bar-fill { height: 100%; background: var(--accent2); border-radius: 3px; transition: width .4s ease; }
.progress-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.prog-step-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); cursor: pointer; font-size: 11px; font-weight: 800; color: var(--muted); display: flex; align-items: center; justify-content: center; transition: all .2s; }
.prog-step-dot:hover { border-color: var(--accent); }
.prog-step-dot.done { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.comments-section { margin-top: 32px; }
.comments-section h3 { font-size: 16px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.comment-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.comment-form textarea { width: 100%; min-height: 72px; margin-bottom: 10px; resize: vertical; }
.comment-list { display: flex; flex-direction: column; gap: 10px; }
.comment-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent2); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.comment-author { font-weight: 700; font-size: 14px; }
.comment-date { font-size: 12px; color: var(--muted); margin-left: auto; }
.comment-text { font-size: 14px; line-height: 1.65; color: var(--text); }
.related-section { margin-top: 32px; }
.related-section h3 { font-size: 16px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.related-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all .2s; }
.related-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.related-thumb { height: 120px; background: linear-gradient(135deg, #e8e8e8, #d0d0d0); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: rgba(0,0,0,.15); overflow: hidden; background-size: cover; background-position: center; }
.related-body { padding: 12px 14px; }
.related-body .r-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 4px; }
.related-body .r-title { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3; }
.code-block-view { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-top: 12px; }
.code-block-header { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #1e2127; color: #abb2bf; font-size: 12px; }
.code-lang-label { background: rgba(255,255,255,.08); padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.copy-code-btn { margin-left: auto; background: rgba(255,255,255,.1); border: none; color: #abb2bf; padding: 3px 10px; border-radius: 5px; cursor: pointer; font-size: 11px; font-weight: 600; font-family: inherit; transition: all .2s; }
.copy-code-btn:hover { background: rgba(255,255,255,.2); color: white; }
.code-block-view pre { margin: 0; }
.code-block-view pre code { display: block; background: #1e2127; color: #abb2bf; font-family: monospace; font-size: 13px; line-height: 1.6; padding: 14px 16px; white-space: pre-wrap; overflow-x: auto; }
.yt-embed-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; margin-top: 12px; background: #000; }
.yt-embed-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.course-cover { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; margin-bottom: 16px; }
.course-cover-placeholder { width: 100%; height: 160px; background: linear-gradient(135deg,#e8e8e8,#d4d4d4); border-radius: 8px; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800; color: rgba(0,0,0,.12); }
.course-project-row { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; cursor: pointer; transition: all .2s; }
.course-project-row:hover { transform: translateX(4px); border-color: var(--accent); }
.course-project-num { width: 36px; height: 36px; border-radius: 50%; background: var(--accent2); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; flex-shrink: 0; }
.course-project-info { flex: 1; }
.course-project-info h4 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.course-project-info p { font-size: 13px; color: var(--muted); }
.project-picker-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 10px; max-height: 360px; overflow-y: auto; padding: 4px; }
.picker-card { border: 2px solid var(--border); border-radius: 8px; padding: 12px; cursor: pointer; transition: all .2s; background: var(--surface); }
.picker-card:hover { border-color: var(--accent); }
.picker-card.selected { border-color: var(--accent2); background: var(--surface2); }
.picker-card .picker-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.picker-card .picker-cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.selected-order { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.selected-badge { display: flex; align-items: center; gap: 6px; background: var(--accent2); color: #fff; padding: 4px 10px; border-radius: 50px; font-size: 12px; font-weight: 600; }
.selected-badge button { background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.profile-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.social-link { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); text-decoration: none; padding: 3px 10px; border-radius: 50px; border: 1px solid var(--border); transition: all .2s; }
.social-link:hover { border-color: var(--accent); color: var(--text); }
.profile-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ── GitHub Repo Card ─────────────────────────── */
.github-repo-card{background:#f6f8fa;border:1px solid #d0d7de;border-radius:12px;padding:16px 20px;margin:20px 0;text-decoration:none;display:block;transition:box-shadow .2s}
.github-repo-card:hover{box-shadow:0 4px 16px rgba(0,0,0,.1)}
.github-repo-header{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.github-repo-header svg{flex-shrink:0;color:#57606a}
.github-repo-name{font-weight:700;font-size:15px;color:#0969da;word-break:break-all}
.github-repo-desc{font-size:13px;color:#57606a;margin-bottom:10px;line-height:1.5}
.github-repo-meta{display:flex;gap:16px;flex-wrap:wrap}
.github-repo-meta span{display:flex;align-items:center;gap:4px;font-size:12px;color:#57606a}
.github-lang-dot{width:10px;height:10px;border-radius:50%;display:inline-block}
.github-repo-loading{color:var(--muted);font-size:13px;padding:12px;text-align:center}
.github-repo-error{color:#cf222e;font-size:13px;padding:8px 0}

/* ── Step GitHub File Embed ───────────────────── */
.step-github-file{margin-top:12px;border:1px solid #d0d7de;border-radius:8px;overflow:hidden}
.step-github-file-header{background:#f6f8fa;padding:8px 14px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #d0d7de}
.step-github-file-name{font-size:12px;font-weight:600;color:#57606a;font-family:monospace}
.step-github-file-link{font-size:11px;color:#0969da;text-decoration:none}
.step-github-file-link:hover{text-decoration:underline}

/* ── Uniqueness Warning ───────────────────────── */
.similar-projects-box{background:#fffbf0;border:1px solid #e8c84a;border-radius:10px;padding:14px 16px;margin-top:8px}
.similar-projects-box h4{font-size:13px;font-weight:700;color:#7d5a00;margin:0 0 10px;display:flex;align-items:center;gap:6px}
.similar-project-row{display:flex;align-items:center;gap:10px;padding:6px 0;border-bottom:1px solid #f0e6b2}
.similar-project-row:last-child{border-bottom:none}
.similar-project-thumb{width:36px;height:36px;border-radius:6px;background:var(--light-grey);object-fit:cover;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:11px;color:var(--muted)}
.similar-project-info{flex:1;min-width:0}
.similar-project-title{font-size:13px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.similar-project-meta{font-size:11px;color:var(--muted)}
.similar-project-link{font-size:11px;color:var(--accent);text-decoration:none;flex-shrink:0;font-weight:600}
.unique-ok{background:#f0fdf4;border:1px solid #86efac;border-radius:8px;padding:8px 12px;font-size:12px;color:#166534;margin-top:6px;display:flex;align-items:center;gap:6px}

/* ── Step GitHub File Input (submit form) ─────── */
.step-gh-file-row{display:flex;gap:8px;align-items:center;margin-top:10px}
.step-gh-file-row input{flex:1;font-size:12px;padding:7px 10px}
.step-gh-file-row button{flex-shrink:0;padding:7px 12px;font-size:12px;background:#24292f;color:#fff;border:none;border-radius:8px;cursor:pointer;white-space:nowrap}
.step-gh-file-row button:hover{background:#444}
.step-gh-file-preview{margin-top:8px;border:1px solid #d0d7de;border-radius:8px;overflow:hidden;font-size:12px}
.step-gh-file-preview-header{background:#f6f8fa;padding:7px 12px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #d0d7de;gap:8px}
.step-gh-file-preview-name{font-family:monospace;font-size:12px;color:#57606a;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.step-gh-file-preview pre{margin:0;padding:12px;background:#1a1a2e;color:#e0e0e0;font-size:12px;overflow-x:auto;max-height:220px;line-height:1.5}
.step-gh-file-fetching{padding:10px;color:var(--muted);font-size:12px;text-align:center}
.step-gh-file-error{padding:8px 12px;color:#cf222e;font-size:12px}

/* ── Repo dupe warning ────────────────────────── */
.repo-dupe-warn{background:#fff0f0;border:1px solid #fca5a5;border-radius:8px;padding:10px 14px;margin-top:8px;font-size:13px;display:flex;align-items:center;gap:8px;color:#991b1b}
.repo-dupe-warn a{color:#991b1b;font-weight:700}

/* ═══════════════════════════════════════════════
   USERNAME SETUP / CHANGE MODAL (blocking overlay)
   ═══════════════════════════════════════════════ */
.username-setup-overlay{
  position:fixed; inset:0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display:flex; align-items:center; justify-content:center;
  padding: 16px;
  animation: fadeIn .2s ease both;
}
.username-setup-modal{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 26px 22px;
  width: 100%;
  max-width: 420px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  text-align: center;
  animation: scaleIn .25s cubic-bezier(.18,.9,.3,1.2) both;
}
.username-setup-icon{
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #111 0%, #333 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.username-setup-modal h2{
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.3px;
}
.username-setup-sub{
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 16px;
}
.username-setup-modal input[type="text"]{
  width: 100%;
  text-align: center;
  font-size: 16px;
  letter-spacing: 0.3px;
  font-family: 'JetBrains Mono', monospace;
}
.username-setup-hint{
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
  text-align: left;
}
@keyframes scaleIn{
  from{opacity:0;transform:scale(.92)}
  to{opacity:1;transform:scale(1)}
}
@keyframes fadeIn{
  from{opacity:0}
  to{opacity:1}
}

/* ═══════════════════════════════════════════════
   ONBOARDING WIZARD
   ═══════════════════════════════════════════════ */
.onboarding-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  animation: modalPop .25s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}
.onboarding-modal .username-setup-icon {
  width: 60px; height: 60px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); border-radius: 50%;
  color: var(--accent);
}
.onboarding-modal h2 {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}
.onboarding-modal .username-setup-sub {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.onboarding-progress {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 20px;
}
.onboarding-dot {
  width: 32px; height: 5px; border-radius: 100px;
  background: var(--surface2);
  transition: background .25s;
}
.onboarding-dot.active { background: var(--accent); }

.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
@media (max-width: 520px) {
  .onboarding-grid { grid-template-columns: repeat(2, 1fr); }
}
.onboarding-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
  color: var(--text);
  text-align: center;
}
.onboarding-tile:hover { border-color: var(--border2); transform: translateY(-1px); }
.onboarding-tile.selected {
  border-color: var(--accent);
  background: rgba(34,197,94,.10);
}
.onboarding-tile-icon { color: var(--accent); }
.onboarding-tile-label { font-size: 12px; font-weight: 700; }

.onboarding-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.onboarding-chip {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.onboarding-chip:hover { border-color: var(--border2); }
.onboarding-chip.selected {
  border-color: var(--accent);
  background: rgba(34,197,94,.10);
  color: var(--accent);
}

.onboarding-suggestions {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 20px;
  max-height: 320px;
  overflow-y: auto;
}
.onboarding-suggestion {
  display: flex; gap: 10px; align-items: center;
  padding: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.onboarding-actions {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 10px;
}
.onboarding-actions .btn-primary { min-width: 120px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }

/* ═══════════════════════════════════════════════
   SKILL PICKER MODAL
   ═══════════════════════════════════════════════ */
.sp-modal{
  max-width: 560px;
  text-align: left;
}
.sp-modal h2{ text-align: center; }
.sp-modal .username-setup-sub{ text-align: center; }
.sp-summary{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.sp-summary > div{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.sp-summary-label{
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.sp-summary-val{
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
}
.sp-summary-total .sp-summary-val{
  color: #0a7b3a;
}
.sp-groups{
  max-height: 45vh;
  overflow-y: auto;
  padding-right: 4px;
}
.sp-group{ margin-bottom: 12px; }

/* ── NOTIFICATIONS ── */
.notif-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mobile-notif-btn{
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.notif-dot{
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--bg, #0e0e10);
}
.mobile-notif-btn .notif-dot{
  position: static;
  box-shadow: none;
}
.notif-dot-inline{
  position: static;
  margin-left: 8px;
  box-shadow: none;
}
.notif-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notif-row{
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s, transform .05s;
}
.notif-row:hover{ border-color: var(--accent); }
.notif-row:active{ transform: scale(.995); }
.notif-row.unread{
  background: linear-gradient(180deg, rgba(34,197,94,.06), rgba(34,197,94,.02));
  border-color: rgba(34,197,94,.3);
}
.notif-icon{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent2);
  flex-shrink: 0;
}
.notif-title{
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.35;
}
.notif-actor{
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}
.notif-text{
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}
.notif-time{
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  opacity: .85;
}
.notif-unread-dot{
  width: 9px;
  height: 9px;
  background: #22c55e;
  border-radius: 50%;
  margin-top: 10px;
  align-self: flex-start;
  flex-shrink: 0;
}

/* Build-complete chip on the project page */
.build-done-chip{
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(34,197,94,.12);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,.35);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  max-width: 520px;
}
.build-done-chip strong{ color: var(--text); }
.build-done-chip-pending{
  background: rgba(234,179,8,.12);
  color: #eab308;
  border-color: rgba(234,179,8,.45);
}
.build-done-thumb{
  flex-shrink: 0;
  position: relative;
  width: 68px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0,0,0,.2);
}
.build-done-thumb a{ display:block; width:100%; height:100%; }
.build-done-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.build-done-thumb .play-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0,0,0,.28);
  pointer-events: none;
}

/* Public Builds & Proofs gallery on the project page */
.build-proof-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.build-proof-card{
  background: var(--surface, #151826);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, border-color .15s ease;
}
.build-proof-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.18);
}
.build-proof-media{
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000;
  position: relative;
}
.build-proof-media iframe,
.build-proof-media img{
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
}
.build-proof-foot{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.build-proof-name{
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.build-proof-name:hover{ color: var(--accent); }
.build-proof-date{
  font-size: 12px;
  color: var(--muted);
}
.bp-verified{ color: #22c55e; font-weight: 600; }

/* Reaction row on each build proof card */
.build-proof-reactions{
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
  margin-top: -4px;
}
.build-proof-reactions-readonly{ pointer-events: none; }
.bpr-btn, .bpr-stat{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255,255,255,.12));
  background: rgba(255,255,255,.03);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.bpr-stat{ cursor: default; }
.bpr-btn:hover{
  background: rgba(255,255,255,.08);
  color: var(--text);
  border-color: rgba(255,255,255,.22);
}
.bpr-btn:active{ transform: scale(.96); }
.bpr-btn.active{
  background: rgba(34,197,94,.15);
  color: #22c55e;
  border-color: rgba(34,197,94,.45);
}
.bpr-btn.bpr-fake.active{
  background: rgba(239,68,68,.15);
  color: #ef4444;
  border-color: rgba(239,68,68,.45);
}
.bpr-stat.bpr-fake-stat{ color: #ef4444; border-color: rgba(239,68,68,.35); }

/* Project flag banner + flag modal */
.project-flag-banner{
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(234,179,8,.12);
  color: #eab308;
  border: 1px solid rgba(234,179,8,.45);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
}
.project-flag-banner strong{ color: var(--text); }

.pf-reasons{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  text-align: left;
}
.pf-reason-row{
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.pf-reason-row:hover{ border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.03); }
.pf-reason-row input[type=radio]{ margin-top: 3px; accent-color: var(--accent2, #ef4444); }
.pf-reason-row input[type=radio]:checked + div strong{ color: #ef4444; }

.pfa-row{
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.02);
}

/* AI review result panel on the submit page */
.ai-review-loading,
.ai-review-error{
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 8px; font-size: 13.5px;
}
.ai-review-loading{ background: rgba(168,85,247,.1); color: #a855f7; border: 1px solid rgba(168,85,247,.35); }
.ai-review-error{ background: rgba(239,68,68,.1); color: #ef4444; border: 1px solid rgba(239,68,68,.35); }

.ai-review-result{ display: flex; flex-direction: column; gap: 12px; }
.ai-review-head{
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border);
}
.ai-review-head strong{ font-size: 14.5px; }
.ai-verdict-good{ background: rgba(34,197,94,.12); color: #22c55e; border-color: rgba(34,197,94,.4); }
.ai-verdict-warn{ background: rgba(234,179,8,.12); color: #eab308; border-color: rgba(234,179,8,.45); }
.ai-verdict-bad{  background: rgba(239,68,68,.12); color: #ef4444; border-color: rgba(239,68,68,.45); }
.ai-verdict-good strong, .ai-verdict-warn strong, .ai-verdict-bad strong{ color: var(--text); }

.ai-review-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.ai-review-metric{
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.ai-metric-label{ font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ai-metric-val{ font-size: 18px; font-weight: 700; margin-top: 4px; display: flex; align-items: baseline; gap: 6px; }
.ai-metric-val small{ font-size: 12px; font-weight: 500; opacity: .7; }
.ai-metric-sub{ font-size: 12px; color: var(--muted); margin-top: 4px; }
.ai-good{ color: #22c55e; }
.ai-warn{ color: #eab308; }
.ai-bad{ color: #ef4444; }

.ai-review-section{
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}
.ai-review-section strong{ font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ai-review-section ul{ margin: 6px 0 0; padding-left: 20px; }
.ai-review-section li{ font-size: 13.5px; margin: 3px 0; }

.ai-review-flag{
  display: flex; align-items: center; gap: 8px;
  background: rgba(239,68,68,.12);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.4);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}

/* Build-cap modal rows */
.bcm-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 6px;
  text-align: left;
}
.bcm-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.bcm-info strong{ display: block; font-size: 14px; }
.bcm-info small{ color: var(--muted); font-size: 12px; }
.bcm-actions{ display: flex; gap: 6px; flex-shrink: 0; }

/* Proof modal */
.proof-group{
  text-align: left;
  margin-top: 12px;
}
.proof-label{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 6px;
}
.proof-dropzone{
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  transition: border-color .15s;
}
.proof-dropzone:hover{ border-color: var(--accent); }
.proof-or{
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0 0;
  letter-spacing: .4px;
}
.sp-group-head{
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 6px;
}
.sp-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sp-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px 6px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: all .15s;
}
.sp-chip:hover{ border-color: var(--border2); }
.sp-chip.sp-on{
  background: #111;
  color: #fff;
  border-color: #111;
}
.sp-chip .sp-xp{
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  opacity: .75;
}
.sp-chip.sp-on .sp-xp{ opacity: 1; color: #7effa7; }
.sp-cap-note{
  font-size: 11.5px;
  color: var(--muted);
  margin: 10px 0 12px;
  text-align: center;
  font-style: italic;
}

/* ═══════════════════════════════════════════════
   XP GUIDE PAGE
   ═══════════════════════════════════════════════ */
.xpg-hero{
  text-align: center;
  padding: 20px 16px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.xpg-hero-icon{
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #111 0%, #444 100%);
  color: #f3d24e;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
}
.xpg-hero h1{
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
}
.xpg-hero p{
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  font-size: 15px;
}
.xpg-section{ margin-bottom: 40px; }
.xpg-section h2{
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.xpg-sub{
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
  max-width: 700px;
}
.xpg-table-wrap{
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.xpg-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.xpg-table th{
  background: var(--surface2);
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.xpg-table td{
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.xpg-table tr:last-child td{ border-bottom: none; }
.xpg-action{ font-weight: 600; }
.xpg-xp{
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #0a7b3a;
  white-space: nowrap;
  width: 80px;
}
.xpg-note{ color: var(--muted); font-size: 13px; }
.xpg-skills{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.xpg-skillgroup{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.xpg-skillgroup h4{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.xpg-skillchips{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.xpg-skillchip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 10px;
  font-size: 12.5px;
}
.xpg-skillchip em{
  font-style: normal;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #0a7b3a;
  font-weight: 700;
}
.xpg-tips ul{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.xpg-tips li{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
}
.xpg-tips li strong{ color: #0a7b3a; font-family: 'JetBrains Mono', monospace; }

/* ═══════════════════════════════════════════════
   DUPE BLOCK + CHALLENGE CTA (on submit page)
   ═══════════════════════════════════════════════ */
.dupe-block{
  margin-top: 10px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff5e6 0%, #fff0d4 100%);
  border: 1.5px solid #e0a960;
  color: #6b3b00;
}
.dupe-block-head{
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; margin-bottom: 6px;
}
.dupe-block-body{
  font-size: 13.5px; line-height: 1.5;
  margin-bottom: 10px;
}
.dupe-block-body em{ font-style: italic; font-weight: 600; }
.dupe-block-ref{
  font-size: 13px; background: rgba(255,255,255,0.5);
  padding: 8px 12px; border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(180,120,40,0.3);
}
.dupe-block-ref a{ color: #7c4b00; font-weight: 700; text-decoration: underline; }
.dupe-block-challenge{
  background: #111 !important;
  display: inline-flex; align-items: center; gap: 6px;
}

.grant-banner{
  display: flex; align-items: flex-start; gap: 10px;
  background: linear-gradient(180deg, #e6f5ea 0%, #d4ecdb 100%);
  border: 1.5px solid #4faf6d;
  color: #0a4a22;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.grant-banner > div{ line-height: 1.45; font-size: 14px; }

/* ═══════════════════════════════════════════════
   VERSION REVIEW CARD (inventor's pending-versions)
   ═══════════════════════════════════════════════ */
.version-review-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}
.vrc-head{
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.vrc-tag{ font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.vrc-head h3{ margin: 0 0 4px; font-size: 1.1rem; }
.vrc-meta{ font-size: 13px; color: var(--muted); }
.vrc-body{
  background: var(--bg);
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
  margin-bottom: 14px;
}
.vrc-body p{ color: var(--muted); margin: 6px 0 0; }
.vrc-skills{
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.vrc-skills-label{
  font-size: 12px; font-weight: 700; color: var(--muted);
  margin-right: 4px; text-transform: uppercase; letter-spacing: .5px;
}
.vrc-verdict-title{
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--muted); margin-bottom: 8px;
}
.vrc-verdicts{
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.vrc-verdict{
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: all .15s;
}
.vrc-verdict:hover{ border-color: var(--accent); transform: translateY(-1px); }
.vrc-verdict > span{ display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.vrc-verdict strong{ font-size: 14px; font-weight: 700; }
.vrc-verdict em{
  font-style: normal; font-size: 12px;
  color: var(--muted); line-height: 1.4;
}
.vrc-verdict.vrc-approve{ border-left: 3px solid #1e8a4c; }
.vrc-verdict.vrc-transfer{ border-left: 3px solid #8a6d1e; }
.vrc-verdict.vrc-unique{ border-left: 3px solid #2a6f80; }
.vrc-verdict.vrc-feedback{ border-left: 3px solid #a07c10; }
.vrc-verdict.vrc-reject{ border-left: 3px solid #9b2c2c; color: #9b2c2c; }

/* ═══════════════════════════════════════════════
   MY CHALLENGES (challenger's view)
   ═══════════════════════════════════════════════ */
.mc-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
}
.mc-head{
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px;
  flex-wrap: wrap; margin-bottom: 12px;
}
.mc-proj{ font-size: 15px; font-weight: 700; }
.mc-sub{ font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.mc-status{
  padding: 4px 10px; border-radius: 100px;
  font-size: 12px; font-weight: 700;
  white-space: nowrap;
}
.mc-body{ background: var(--bg); border-radius: 8px; padding: 12px; font-size: 14px; }
.mc-body p{ color: var(--muted); margin: 4px 0 0; }
.mc-feedback{
  margin-top: 10px;
  padding: 10px 12px;
  background: #fff7e6;
  border: 1px solid #e0c070;
  border-radius: 8px;
}
.mc-feedback p{ color: #6b3b00; margin-top: 4px; }
.mc-actions{
  display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════
   SITE FOOTER
   ═══════════════════════════════════════════════ */
#site-footer{
  background: #111;
  color: #d4d4d4;
  border-top: 1px solid #222;
  margin-top: 64px;
  padding: 56px 24px 20px;
}
#site-footer .footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .footer-logo{
  height: 32px;
  filter: invert(1) brightness(1.15);
  margin-bottom: 14px;
}
.footer-tagline{
  color: #9a9a9a;
  font-size: 14px;
  line-height: 1.6;
  max-width: 340px;
}
.footer-heading{
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}
.footer-links{
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0;
}
.footer-links a{
  color: #b5b5b5;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s;
}
.footer-links a:hover{ color: #fff; }
.footer-small{
  color: #6b6b6b;
  font-size: 12px;
  margin-top: 14px;
  font-style: italic;
}
.footer-bottom{
  max-width: 1200px;
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: #8a8a8a;
  flex-wrap: wrap;
}
.footer-credit a{
  color: #e0e0e0;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted #666;
  transition: color .15s, border-color .15s;
}
.footer-credit a:hover{
  color: #fff;
  border-bottom-color: #fff;
}
@media (max-width: 900px){
  #site-footer{ padding: 44px 18px 18px; margin-top: 48px; }
  #site-footer .footer-inner{
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .footer-brand{ grid-column: 1 / -1; }
}
@media (max-width: 520px){
  #site-footer .footer-inner{ grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom{ flex-direction: column; align-items: flex-start; gap: 6px; }
  .footer-brand{ grid-column: auto; }
}

/* ═══════════════════════════════════════════════
   NEW-VERSION BANNER
   ═══════════════════════════════════════════════ */
#update-banner{
  position:fixed;
  left:50%;bottom:22px;transform:translateX(-50%);
  background:linear-gradient(135deg,#6d28d9 0%,#4f46e5 100%);
  color:#fff;
  display:flex;align-items:center;gap:12px;
  padding:11px 14px 11px 18px;
  border-radius:999px;
  box-shadow:0 14px 36px -10px rgba(79,70,229,.55), 0 0 0 1px rgba(255,255,255,.08) inset;
  font-size:14px;font-weight:600;
  z-index:9999;
  animation:updateBannerIn .38s cubic-bezier(.18,.9,.3,1.2) both;
  max-width:calc(100% - 32px);
}
.update-banner-text{line-height:1.3}
.update-banner-refresh{
  background:#fff;color:#4f46e5;
  border:none;border-radius:999px;
  padding:7px 14px;font-weight:800;font-size:13px;
  cursor:pointer;letter-spacing:.01em;
  transition:transform .15s ease;
}
.update-banner-refresh:hover{transform:translateY(-1px)}
.update-banner-close{
  background:transparent;border:none;color:rgba(255,255,255,.85);
  font-size:20px;line-height:1;cursor:pointer;padding:4px 6px;
  border-radius:8px;
}
.update-banner-close:hover{background:rgba(255,255,255,.15);color:#fff}
@keyframes updateBannerIn{
  from{opacity:0;transform:translateX(-50%) translateY(14px)}
  to  {opacity:1;transform:translateX(-50%) translateY(0)}
}
@media (max-width:480px){
  #update-banner{left:10px;right:10px;transform:none;border-radius:14px;justify-content:space-between}
  #update-banner{animation:updateBannerInMobile .38s cubic-bezier(.18,.9,.3,1.2) both}
}
@keyframes updateBannerInMobile{
  from{opacity:0;transform:translateY(14px)}
  to  {opacity:1;transform:translateY(0)}
}

/* ═══════════════════════════════════════════════
   ACHIEVEMENTS / BADGE WALL
   ═══════════════════════════════════════════════ */
.ach-header{display:flex;align-items:center;justify-content:space-between;margin:28px 0 14px;gap:12px;flex-wrap:wrap}
.ach-progress{font-size:13px;color:var(--muted);font-weight:600;letter-spacing:.02em}

.ach-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(170px,1fr));
  gap:14px;
  margin-bottom:32px;
}

.ach-card{
  position:relative;
  overflow:hidden;
  padding:20px 14px 16px;
  border-radius:14px;
  border:1px solid var(--border);
  text-align:center;
  cursor:default;
  transition:transform .18s ease, box-shadow .18s ease;
  isolation:isolate;
  min-height:180px;
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
}

.ach-card:hover{transform:translateY(-3px)}

/* Shine sweep on hover for earned badges */
.ach-shine{
  position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(100deg, transparent 40%, rgba(255,255,255,.25) 50%, transparent 60%);
  transform:translateX(-110%);
  transition:transform .9s ease;
}
.ach-earned:hover .ach-shine{transform:translateX(110%)}

.ach-icon{
  width:64px;height:64px;
  display:flex;align-items:center;justify-content:center;
  margin:2px auto 12px;
  border-radius:50%;
  background:radial-gradient(circle at 30% 25%,rgba(255,255,255,.45) 0%,rgba(255,255,255,.12) 55%,rgba(0,0,0,.12) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.5),
    inset 0 -4px 10px rgba(0,0,0,.18),
    0 6px 14px -4px rgba(0,0,0,.28);
  position:relative;z-index:2;
  color:currentColor;
}
.ach-icon::before{
  content:"";position:absolute;inset:4px;border-radius:50%;
  border:1px solid rgba(255,255,255,.35);
  pointer-events:none;
}
.ach-icon svg{
  width:32px;height:32px;stroke-width:2.1;
  filter:drop-shadow(0 2px 3px rgba(0,0,0,.35));
  position:relative;z-index:1;
}
.ach-label{
  font-weight:800;font-size:14px;
  margin-bottom:6px;
  position:relative;z-index:2;
  letter-spacing:.01em;
}
.ach-desc{
  font-size:11.5px;line-height:1.45;
  opacity:.85;
  position:relative;z-index:2;
  padding:0 2px;
}
.ach-tier-tag{
  position:absolute;top:8px;right:10px;
  font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;
  padding:2px 7px;border-radius:999px;
  background:rgba(255,255,255,.22);
  color:rgba(255,255,255,.95);
  backdrop-filter:blur(4px);
  z-index:2;
}

/* Earned — tier-specific gradients */
.ach-earned.ach-bronze{
  background:linear-gradient(135deg,#b07037 0%,#d99155 50%,#8f5220 100%);
  color:#fff;border-color:#8f5220;
  box-shadow:0 6px 18px -8px rgba(176,112,55,.7);
}
.ach-earned.ach-silver{
  background:linear-gradient(135deg,#6b7683 0%,#b9c3cf 50%,#5c6672 100%);
  color:#fff;border-color:#5c6672;
  box-shadow:0 6px 18px -8px rgba(107,118,131,.7);
}
.ach-earned.ach-gold{
  background:linear-gradient(135deg,#c88a0a 0%,#fbd36b 50%,#a76f05 100%);
  color:#3a2300;border-color:#a76f05;
  box-shadow:0 6px 20px -6px rgba(200,138,10,.75);
}
.ach-earned.ach-gold .ach-desc{color:#3a2300;opacity:.95}
.ach-earned.ach-gold .ach-tier-tag{background:rgba(0,0,0,.18);color:#3a2300}

.ach-earned.ach-legendary{
  background:linear-gradient(135deg,#6d28d9 0%,#e11d48 40%,#f97316 75%,#facc15 100%);
  background-size:200% 200%;
  color:#fff;border-color:#5b21b6;
  animation:achLegendShift 6s ease-in-out infinite;
  box-shadow:0 8px 24px -8px rgba(125,50,200,.8);
}
@keyframes achLegendShift{
  0%,100%{background-position:0% 50%}
  50%{background-position:100% 50%}
}

/* Locked — muted, inviting the user to unlock */
.ach-locked{
  background:var(--card);
  border-style:dashed;
  opacity:.85;
}
.ach-locked .ach-icon{
  opacity:.55;filter:grayscale(1);
  background:radial-gradient(circle at 30% 25%,rgba(255,255,255,.08) 0%,rgba(0,0,0,.05) 100%);
  box-shadow:inset 0 0 0 1px var(--border);
}
.ach-locked .ach-icon::before{border-color:rgba(255,255,255,.15)}
.ach-locked .ach-icon svg{width:26px;height:26px;color:var(--muted);filter:none}
.ach-locked .ach-label{color:var(--muted)}
.ach-locked .ach-desc{color:var(--muted);font-style:italic}
.ach-locked .ach-tier-tag{background:var(--surface2);color:var(--muted)}

/* Bonus badges (legacy / challenge / build-specific) */
.ach-bonus .ach-tier-tag{background:rgba(255,255,255,.28)}

@media (max-width:540px){
  .ach-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
  .ach-card{padding:16px 10px 12px;min-height:160px}
  .ach-icon{width:56px;height:56px}
  .ach-icon svg{width:28px;height:28px}
}

/* ─────────────────────────────────────────
   PHOTO EDITOR MODAL
───────────────────────────────────────── */
.photo-editor-overlay{
  position:fixed;inset:0;z-index:10000;
  background:rgba(5,5,10,.78);backdrop-filter:blur(8px);
  display:flex;align-items:center;justify-content:center;
  padding:16px;
  animation:peFadeIn .2s ease;
}
@keyframes peFadeIn{from{opacity:0}to{opacity:1}}
.photo-editor-modal{
  background:var(--surface);color:var(--text);
  border:1px solid var(--border);border-radius:14px;
  width:min(960px,100%);max-height:min(92vh,860px);
  display:flex;flex-direction:column;
  box-shadow:0 30px 80px -20px rgba(0,0,0,.7),0 0 0 1px rgba(255,255,255,.04);
  overflow:hidden;
  animation:pePop .22s cubic-bezier(.2,.9,.2,1.2);
}
@keyframes pePop{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
.pe-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 20px;border-bottom:1px solid var(--border);
}
.pe-header h3{margin:0;font-size:16px;font-weight:700;letter-spacing:.01em}
.pe-close{
  background:transparent;border:none;color:var(--muted);cursor:pointer;
  width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;
}
.pe-close:hover{background:var(--surface2);color:var(--text)}
.pe-body{
  display:grid;grid-template-columns:1fr 300px;gap:0;
  flex:1;min-height:0;overflow:hidden;
}
.pe-canvas-wrap{
  background:#070708;
  display:flex;align-items:center;justify-content:center;
  position:relative;padding:18px;
  min-height:320px;
  overflow:hidden;
}
.pe-canvas{
  max-width:100%;max-height:100%;
  border-radius:6px;
  box-shadow:0 6px 30px -6px rgba(0,0,0,.6),inset 0 0 0 1px rgba(255,255,255,.06);
  touch-action:none;cursor:grab;
  background:#0a0a0a;
}
.pe-canvas:active{cursor:grabbing}
.pe-hint{
  position:absolute;bottom:8px;left:50%;transform:translateX(-50%);
  font-size:11px;color:rgba(255,255,255,.55);
  background:rgba(0,0,0,.45);padding:3px 10px;border-radius:999px;
  backdrop-filter:blur(4px);pointer-events:none;
}
.pe-controls{
  background:var(--surface);border-left:1px solid var(--border);
  padding:18px;overflow-y:auto;
  display:flex;flex-direction:column;gap:16px;
}
.pe-section{display:flex;flex-direction:column;gap:10px}
.pe-section-title{
  font-size:10.5px;font-weight:800;letter-spacing:.08em;
  text-transform:uppercase;color:var(--muted);
}
.pe-btn-row{display:flex;gap:6px;flex-wrap:wrap}
.pe-btn{
  flex:1;min-width:0;padding:8px 10px;border-radius:8px;
  background:var(--surface2);border:1px solid var(--border);
  color:var(--text);font-size:12.5px;font-weight:600;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:5px;
  transition:background .15s ease,border-color .15s ease,transform .1s;
}
.pe-btn:hover{background:var(--card);border-color:var(--border2)}
.pe-btn:active{transform:translateY(1px)}
.pe-aspect-btn.pe-active{
  background:var(--accent);color:#fff;border-color:var(--accent);
  box-shadow:0 3px 10px -3px rgba(99,102,241,.5);
}
.pe-slider-row{display:flex;flex-direction:column;gap:6px}
.pe-slider-row label{
  font-size:11.5px;font-weight:600;color:var(--muted);
  display:flex;justify-content:space-between;
}
.pe-val{color:var(--text);font-variant-numeric:tabular-nums;font-weight:700}
.pe-slider-row input[type="range"]{
  width:100%;accent-color:var(--accent);
}
.pe-actions{
  display:flex;gap:8px;margin-top:4px;
  padding-top:12px;border-top:1px solid var(--border);
}
.pe-actions button{flex:1;padding:10px;font-size:13px;font-weight:700;border-radius:8px}
@media (max-width:720px){
  .pe-body{grid-template-columns:1fr;grid-template-rows:minmax(260px,1fr) auto}
  .pe-controls{border-left:none;border-top:1px solid var(--border);max-height:45vh}
  .photo-editor-modal{max-height:100vh;border-radius:0}
}

/* ============ Weekly summary page ============ */
.weekly-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0 20px;
}
@media (max-width:720px){.weekly-grid{grid-template-columns:repeat(2,1fr)}}
.weekly-stat{
  background:var(--card);border:1px solid var(--border);border-radius:12px;
  padding:14px;display:flex;flex-direction:column;gap:6px;
}
.weekly-stat-label{font-size:11.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.weekly-stat-value{font-size:24px;font-weight:800;color:var(--text);font-variant-numeric:tabular-nums}
.weekly-stat-icon{color:var(--accent);width:18px;height:18px}
.weekly-card{
  background:var(--card);border:1px solid var(--border);border-radius:14px;
  padding:16px;margin-bottom:16px;
}
.weekly-section{margin-top:18px}
.weekly-section h3{
  font-size:14px;font-weight:700;color:var(--text);margin:0 0 10px;
  display:flex;align-items:center;gap:8px;
}
.weekly-list{display:flex;flex-direction:column;gap:8px}
.weekly-list-row{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;background:var(--card);border:1px solid var(--border);
  border-radius:10px;font-size:13px;color:var(--text);
}
.weekly-row-icon{
  width:28px;height:28px;border-radius:50%;flex-shrink:0;
  background:var(--accent-soft);color:var(--accent);
  display:flex;align-items:center;justify-content:center;
}
.weekly-row-icon svg{width:14px;height:14px}
.weekly-row-meta{margin-left:auto;font-size:11.5px;color:var(--muted)}
.weekly-empty{font-size:13px;color:var(--muted);font-style:italic;padding:8px 0}

/* ============ Teams ============ */
.team-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;margin-top:14px;
}
.team-card{
  background:var(--card);border:1px solid var(--border);border-radius:14px;
  padding:16px;display:flex;flex-direction:column;gap:8px;cursor:pointer;
  transition:transform .15s ease, border-color .15s ease;
}
.team-card:hover{transform:translateY(-2px);border-color:var(--accent)}
.team-card-name{font-size:16px;font-weight:700;color:var(--text);margin:0}
.team-card-tag{
  display:inline-block;font-size:11px;font-weight:700;
  padding:2px 8px;border-radius:999px;
  background:var(--accent-soft);color:var(--accent);
  width:fit-content;text-transform:uppercase;letter-spacing:.04em;
}
.team-card-meta{font-size:12px;color:var(--muted);display:flex;gap:10px;margin-top:auto}
.team-card-meta span{display:inline-flex;align-items:center;gap:4px}
.team-card-desc{font-size:13px;color:var(--muted);line-height:1.5;margin:0}
.team-pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:5px 10px;border-radius:999px;
  background:var(--accent-soft);color:var(--accent);
  font-size:12px;font-weight:700;
}
.team-hero{
  background:var(--card);border:1px solid var(--border);border-radius:14px;
  padding:18px;margin-bottom:16px;
}
.team-hero h2{margin:0 0 8px;font-size:22px;font-weight:800}
.team-hero-tag{
  display:inline-block;font-size:11px;font-weight:700;padding:3px 10px;border-radius:999px;
  background:var(--accent-soft);color:var(--accent);
  text-transform:uppercase;letter-spacing:.04em;margin-bottom:10px;
}
.team-hero-stats{display:flex;gap:16px;margin-top:12px;flex-wrap:wrap}
.team-hero-stat{font-size:13px;color:var(--muted)}
.team-hero-stat strong{color:var(--text);font-weight:800;font-size:16px;display:block}
.team-actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}
.team-roster{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.team-roster-row{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;background:var(--card);border:1px solid var(--border);border-radius:10px;
}
.team-roster-name{font-weight:700;color:var(--text);font-size:14px}
.team-roster-xp{margin-left:auto;font-size:12px;color:var(--muted);font-weight:700}

/* ============ DMs / Threads ============ */
.thread-list{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.thread-row{
  display:flex;align-items:center;gap:12px;
  padding:12px 14px;background:var(--card);border:1px solid var(--border);
  border-radius:12px;cursor:pointer;
  transition:border-color .15s ease, transform .15s ease;
}
.thread-row:hover{border-color:var(--accent);transform:translateY(-1px)}
.thread-row .avatar{width:40px;height:40px;border-radius:50%;flex-shrink:0;background:var(--accent-soft);display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--accent)}
.thread-row-body{flex:1;min-width:0}
.thread-row-name{font-weight:700;color:var(--text);font-size:14px}
.thread-row-preview{font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.thread-row-time{font-size:11px;color:var(--muted);flex-shrink:0}
.thread-header{
  display:flex;align-items:center;gap:12px;
  padding:12px 0;border-bottom:1px solid var(--border);margin-bottom:12px;
}
.thread-header .avatar{width:36px;height:36px;border-radius:50%;background:var(--accent-soft);display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--accent)}
.thread-header-name{font-weight:700;font-size:15px;color:var(--text)}
.thread-messages{
  display:flex;flex-direction:column;gap:8px;
  max-height:60vh;overflow-y:auto;padding:8px 4px;
}
.thread-msg{display:flex;flex-direction:column;max-width:75%}
.thread-msg.is-mine{align-self:flex-end;align-items:flex-end}
.thread-msg-bubble{
  padding:9px 13px;border-radius:14px;font-size:14px;line-height:1.45;
  background:var(--card);border:1px solid var(--border);color:var(--text);
  word-wrap:break-word;overflow-wrap:break-word;
}
.thread-msg.is-mine .thread-msg-bubble{
  background:var(--accent);color:#fff;border-color:var(--accent);
}
.thread-msg-time{font-size:10.5px;color:var(--muted);margin-top:3px;padding:0 4px}
.thread-compose{
  display:flex;gap:8px;align-items:flex-end;
  padding:10px 0;border-top:1px solid var(--border);margin-top:8px;
}
.thread-compose textarea{
  flex:1;resize:none;min-height:40px;max-height:120px;
  padding:9px 12px;border-radius:10px;border:1px solid var(--border);
  background:var(--card);color:var(--text);font-size:14px;font-family:inherit;
}
.thread-compose textarea:focus{outline:none;border-color:var(--accent)}
.thread-compose button{
  height:40px;padding:0 16px;border-radius:10px;font-weight:700;
  background:var(--accent);color:#fff;border:none;cursor:pointer;
  display:inline-flex;align-items:center;gap:6px;
}
.thread-compose button:disabled{opacity:.5;cursor:not-allowed}
.thread-empty{text-align:center;color:var(--muted);font-size:13px;padding:32px 16px;font-style:italic}

/* ============ Remix tree (project version history) ============ */
.remix-tree-details{
  background:var(--card);border:1px solid var(--border);border-radius:10px;
  padding:10px 14px;
}
.remix-tree-details summary{
  cursor:pointer;font-weight:700;font-size:13px;color:var(--text);
  display:flex;align-items:center;gap:6px;padding:4px 0;list-style:none;
}
.remix-tree-details summary::-webkit-details-marker{display:none}
.remix-tree-details[open] summary{margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid var(--border)}
.remix-tree{
  position:relative;padding-left:6px;
}
.remix-node{
  position:relative;display:flex;gap:14px;padding:8px 0;
}
.remix-node:not(.is-last)::before{
  content:'';position:absolute;left:13px;top:34px;bottom:-8px;
  width:2px;background:var(--border);
}
.remix-node.is-current:not(.is-last)::before{background:var(--accent)}
.remix-dot{
  width:28px;height:28px;border-radius:50%;flex-shrink:0;
  background:var(--surface2);color:var(--muted);
  display:flex;align-items:center;justify-content:center;
  border:2px solid var(--border);
}
.remix-node.is-current .remix-dot{
  background:var(--accent);color:#fff;border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
}
.remix-body{flex:1;min-width:0;padding-top:2px}
.remix-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:14px}
.remix-current-pill{
  font-size:9.5px;font-weight:800;letter-spacing:.08em;
  padding:2px 7px;border-radius:999px;
  background:var(--accent);color:#fff;
}
.remix-meta{font-size:12px;color:var(--muted);font-weight:400}
.remix-changes{
  font-size:13px;color:var(--text);margin-top:4px;line-height:1.5;
  background:var(--surface);padding:8px 10px;border-radius:6px;
  border-left:3px solid var(--accent);
}

/* ============ Redemption timeline ============ */
.redemption-timeline{
  display:flex;align-items:flex-start;gap:0;
  margin-top:14px;padding-top:12px;border-top:1px solid var(--border);
}
.rdt-step{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;
  text-align:center;min-width:0;
}
.rdt-dot{
  width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface2);color:var(--muted);
  font-weight:800;font-size:12px;
  border:2px solid var(--border);
  transition:all .2s ease;
}
.rdt-step.is-reached .rdt-dot{
  background:var(--accent-soft);color:var(--accent);border-color:var(--accent);
}
.rdt-step.is-current .rdt-dot{
  background:var(--accent);color:#fff;border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
}
.rdt-label{font-size:11.5px;font-weight:700;color:var(--muted)}
.rdt-step.is-reached .rdt-label{color:var(--text)}
.rdt-time{font-size:10.5px;color:var(--muted)}
.rdt-line{
  flex:1;height:2px;background:var(--border);
  margin:15px 4px 0;
  min-width:8px;
}
.rdt-line.is-reached{background:var(--accent)}

/* ============ Course progress ============ */
.course-progress-card{
  background:var(--card);border:1px solid var(--border);border-radius:10px;padding:14px;
}
.course-progress-bar{
  height:8px;background:var(--accent-soft);border-radius:4px;overflow:hidden;
}
.course-progress-fill{
  height:100%;background:linear-gradient(90deg,var(--accent),#7cc4cf);
  transition:width .4s ease;
}
.course-project-row.is-done{opacity:.85}
.course-project-row.is-done .course-project-num{
  background:var(--accent);color:#fff;
}
.course-done-pill{
  display:inline-flex;align-items:center;gap:4px;
  padding:3px 8px;border-radius:999px;
  background:var(--accent-soft);color:var(--accent);
  font-size:11px;font-weight:800;
}

/* ============ Global search ============ */
.search-hero{margin:8px 0 4px}
.search-hero-inner{
  display:flex;align-items:center;gap:10px;
  padding:14px 16px;border-radius:14px;
  background:var(--card);border:1px solid var(--border);
  transition:border-color .15s ease, box-shadow .15s ease;
}
.search-hero-inner:focus-within{
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
}
.search-hero-inner svg{color:var(--muted);flex-shrink:0}
.search-hero-inner input{
  flex:1;background:transparent;border:none;outline:none;
  color:var(--text);font-size:16px;font-family:inherit;
}
.search-hero-inner input::placeholder{color:var(--muted)}
.search-clear{
  background:transparent;border:none;color:var(--muted);
  cursor:pointer;padding:4px;border-radius:6px;display:inline-flex;
}
.search-clear:hover{color:var(--text);background:var(--accent-soft)}

/* ============ Level ladder (XP guide) ============ */
.xpg-hero-mylvl{max-width:520px;margin-left:auto;margin-right:auto}
.xpg-ladder{
  display:flex;flex-direction:column;gap:8px;margin-top:14px;
}
.xpg-rung{
  display:flex;align-items:center;gap:14px;
  padding:14px 16px;border-radius:12px;
  background:var(--card);border:1px solid var(--border);
  position:relative;transition:transform .15s ease, border-color .15s ease;
  opacity:.55;
}
.xpg-rung.is-reached{opacity:1}
.xpg-rung.is-current{
  border-color:var(--accent);
  box-shadow:0 0 0 2px var(--accent-soft);
  transform:scale(1.01);
}
.xpg-rung-num{
  flex-shrink:0;width:60px;font-size:13px;font-weight:800;color:var(--muted);
  font-variant-numeric:tabular-nums;letter-spacing:.02em;
}
.xpg-rung.is-reached .xpg-rung-num{color:var(--text)}
.xpg-rung-body{flex:1;min-width:0}
.xpg-rung-name{font-size:15px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:8px}
.xpg-rung-meta{font-size:12px;color:var(--muted);margin-top:2px;font-variant-numeric:tabular-nums}
.xpg-rung-bar{height:6px;background:var(--accent-soft);border-radius:3px;overflow:hidden;margin-top:8px}
.xpg-rung-fill{height:100%;background:var(--accent);transition:width .4s ease}
.xpg-rung-hint{font-size:11.5px;color:var(--muted);margin-top:4px}
.xpg-you{
  font-size:10px;font-weight:800;letter-spacing:.08em;
  padding:2px 7px;border-radius:999px;
  background:var(--accent);color:#fff;
}
.xpg-rung-tier-pill{
  flex-shrink:0;font-size:10px;font-weight:800;letter-spacing:.05em;
  padding:3px 9px;border-radius:999px;text-transform:uppercase;
}
.xpg-rung-tier-pill.tier-bronze   {background:rgba(205,127,50,.16);color:#cd7f32}
.xpg-rung-tier-pill.tier-silver   {background:rgba(170,170,170,.18);color:#aaa}
.xpg-rung-tier-pill.tier-gold     {background:rgba(255,193,7,.16);color:#e0a800}
.xpg-rung-tier-pill.tier-platinum {background:rgba(124,196,207,.18);color:#7cc4cf}
.xpg-rung-tier-pill.tier-legendary{background:linear-gradient(135deg,rgba(255,80,200,.2),rgba(140,80,255,.2));color:#d76bff}

/* tier-tinted left edge on each rung */
.xpg-rung.tier-bronze   {border-left:3px solid #cd7f32}
.xpg-rung.tier-silver   {border-left:3px solid #aaa}
.xpg-rung.tier-gold     {border-left:3px solid #e0a800}
.xpg-rung.tier-platinum {border-left:3px solid #7cc4cf}
.xpg-rung.tier-legendary{border-left:3px solid #d76bff}

@media (max-width:540px){
  .xpg-rung{padding:12px}
  .xpg-rung-num{width:48px;font-size:12px}
  .xpg-rung-name{font-size:14px}
  .xpg-rung-tier-pill{display:none}
}

/* ============ Level-up banner ============ */
.levelup-banner{
  position:fixed;left:50%;bottom:32px;transform:translateX(-50%) translateY(20px);
  z-index:9999;
  display:flex;align-items:center;gap:14px;
  min-width:300px;max-width:92vw;
  padding:16px 18px;border-radius:14px;
  background:var(--card);border:1px solid var(--accent);
  box-shadow:0 18px 48px rgba(0,0,0,.45), 0 0 0 4px var(--accent-soft);
  opacity:0;transition:opacity .25s ease, transform .25s ease;
}
.levelup-banner.is-in{opacity:1;transform:translateX(-50%) translateY(0)}
.levelup-icon{
  flex-shrink:0;width:54px;height:54px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--accent);color:#fff;
  box-shadow:0 0 20px var(--accent-soft);
}
.levelup-body{flex:1;min-width:0}
.levelup-eyebrow{
  font-size:10.5px;font-weight:800;letter-spacing:.18em;
  color:var(--accent);text-transform:uppercase;
}
.levelup-title{font-size:18px;font-weight:800;color:var(--text);margin-top:2px}
.levelup-sub{font-size:12.5px;color:var(--muted);margin-top:3px}
.levelup-close{
  flex-shrink:0;width:28px;height:28px;border-radius:50%;
  border:none;background:transparent;color:var(--muted);
  font-size:20px;cursor:pointer;line-height:1;
}
.levelup-close:hover{color:var(--text);background:var(--accent-soft)}
.levelup-banner.tier-legendary{
  border-color:#d76bff;
  box-shadow:0 18px 48px rgba(0,0,0,.55), 0 0 0 4px rgba(215,107,255,.25), 0 0 32px rgba(215,107,255,.4);
}
.levelup-banner.tier-legendary .levelup-icon{background:linear-gradient(135deg,#ff50c8,#8c50ff)}
.levelup-banner.tier-platinum  .levelup-icon{background:#7cc4cf}
.levelup-banner.tier-gold      .levelup-icon{background:#e0a800}
.levelup-banner.tier-silver    .levelup-icon{background:#aaa}
.levelup-banner.tier-bronze    .levelup-icon{background:#cd7f32}

/* ════════════════════════════════════════════════ */
/* PROJECT LOGS / BUILD DIARY                       */
/* ════════════════════════════════════════════════ */
.project-updates-section{
  margin:32px 0;padding:20px;background:var(--surface);
  border:1px solid var(--border);border-radius:14px;
}
.project-updates-section h3{margin:0 0 14px;display:flex;align-items:center;gap:8px}
.pu-form{
  display:flex;flex-direction:column;gap:8px;margin-bottom:18px;
  padding:14px;background:var(--bg);border:1px solid var(--border);border-radius:10px;
}
.pu-form input,.pu-form textarea{
  width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:8px;
  background:var(--surface);color:var(--text);font-size:14px;font-family:inherit;
}
.pu-form textarea{min-height:80px;resize:vertical}
.pu-form-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pu-photo-btn{
  display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px dashed var(--border);
  border-radius:8px;cursor:pointer;font-size:13px;color:var(--muted);
}
.pu-photo-btn:hover{border-color:var(--accent2);color:var(--text)}
.pu-photo-chips{display:flex;gap:6px;flex-wrap:wrap;flex:1}
.pu-chip{position:relative;width:42px;height:42px;border-radius:6px;overflow:hidden}
.pu-chip img{width:100%;height:100%;object-fit:cover}
.pu-chip button{
  position:absolute;top:1px;right:1px;width:16px;height:16px;border-radius:50%;
  background:rgba(0,0,0,.7);color:#fff;border:0;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.pu-list{display:flex;flex-direction:column;gap:14px}
.pu-entry{
  padding:14px 16px;background:var(--bg);border:1px solid var(--border);border-radius:10px;
  position:relative;
}
.pu-meta{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.pu-time{color:var(--muted);font-size:12px}
.pu-del{
  background:transparent;border:0;color:var(--muted);cursor:pointer;padding:4px;
  border-radius:6px;
}
.pu-del:hover{background:rgba(239,68,68,.1);color:#ef4444}
.pu-title{font-weight:700;font-size:15px;margin-bottom:4px}
.pu-body{white-space:pre-wrap;line-height:1.55;font-size:14px}
.pu-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:6px;margin-top:10px}
.pu-photos img{width:100%;height:120px;object-fit:cover;border-radius:6px;cursor:pointer}

/* ════════════════════════════════════════════════ */
/* "I MADE IT" GALLERY                              */
/* ════════════════════════════════════════════════ */
.imadeit-section{margin:32px 0}
.imadeit-section h3{margin:0 0 14px;display:flex;align-items:center;gap:8px}
.imadeit-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px;
}
.imadeit-tile{
  position:relative;display:block;border-radius:10px;overflow:hidden;
  background:var(--surface);text-decoration:none;color:inherit;
  border:1px solid var(--border);transition:transform .15s ease, border-color .15s ease;
}
.imadeit-tile:hover{transform:translateY(-2px);border-color:var(--accent2)}
.imadeit-tile img{width:100%;height:140px;object-fit:cover;display:block}
.imadeit-play{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:38px;height:38px;border-radius:50%;background:rgba(0,0,0,.7);
  color:#fff;display:flex;align-items:center;justify-content:center;
}
.imadeit-verified{
  position:absolute;top:6px;right:6px;background:#22c55e;color:#fff;
  border-radius:50%;width:22px;height:22px;display:flex;align-items:center;justify-content:center;
}
.imadeit-foot{
  display:flex;justify-content:space-between;align-items:center;
  padding:8px 10px;font-size:13px;font-weight:600;
}

/* ════════════════════════════════════════════════ */
/* BILL OF MATERIALS                                */
/* ════════════════════════════════════════════════ */
.bom-section{
  margin:24px 0;padding:18px 20px;background:var(--surface);
  border:1px solid var(--border);border-radius:12px;
}
.bom-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.bom-head h3{margin:0;display:flex;align-items:center;gap:8px}
.bom-rows{display:flex;flex-direction:column;gap:6px}
.bom-row{
  display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;
  padding:8px 10px;border-radius:8px;
}
.bom-row:nth-child(odd){background:var(--bg)}
.bom-name{font-size:14px;min-width:0}
.bom-name a{color:var(--accent);text-decoration:none}
.bom-name a:hover{text-decoration:underline}
.bom-price{font-weight:700;font-variant-numeric:tabular-nums;min-width:64px;text-align:right}
.bom-buy-row{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.bom-buy{
  display:inline-flex;align-items:center;gap:4px;padding:3px 8px;
  border:1px solid var(--border);border-radius:100px;font-size:11px;
  background:var(--bg);color:var(--muted);text-decoration:none;
  transition:border-color .15s, color .15s;
}
.bom-buy:hover{border-color:var(--accent2);color:var(--text)}
.bom-total{
  margin-top:14px;padding-top:14px;border-top:1px solid var(--border);
  display:flex;justify-content:space-between;align-items:center;font-size:14px;
}
.bom-total strong{font-size:18px}
@media (max-width:640px){
  .bom-row{grid-template-columns:1fr auto;}
  .bom-buy-row{grid-column:1 / -1;justify-content:flex-start;margin-top:4px}
}

/* ════════════════════════════════════════════════ */
/* AI STEP EXPLAINER                                */
/* ════════════════════════════════════════════════ */
.step-head-row{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  margin-bottom:8px;
}
.step-head-row h4{margin:0;flex:1}
.step-ai-btn{
  display:inline-flex;align-items:center;gap:4px;padding:4px 9px;font-size:11.5px;
  background:linear-gradient(135deg,rgba(140,80,255,.15),rgba(255,80,200,.15));
  border:1px solid rgba(140,80,255,.4);color:#a07cff;border-radius:100px;
  cursor:pointer;font-weight:600;letter-spacing:.02em;transition:transform .12s ease;
}
.step-ai-btn:hover{transform:translateY(-1px)}
.ai-explain-pop{
  margin-top:10px;padding:12px 14px;border-radius:10px;
  background:linear-gradient(135deg,rgba(140,80,255,.08),rgba(255,80,200,.05));
  border:1px solid rgba(140,80,255,.3);
}
.ai-explain-head{
  display:flex;justify-content:space-between;align-items:center;
  font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:#a07cff;margin-bottom:8px;
}
.ai-explain-head button{
  background:transparent;border:0;color:var(--muted);cursor:pointer;padding:2px;
}
.ai-explain-text{font-size:13.5px;line-height:1.55}
.ai-explain-gotchas{
  margin-top:10px;padding:10px;background:rgba(245,158,11,.08);
  border-left:3px solid #f59e0b;border-radius:6px;font-size:13px;
}
.ai-explain-gotchas ul{margin:6px 0 0;padding-left:20px}
.ai-explain-gotchas li{margin:3px 0}

/* ════════════════════════════════════════════════ */
/* ACTIVITY HEATMAP                                 */
/* ════════════════════════════════════════════════ */
.heatmap-section{
  margin:24px 0;padding:18px 20px;background:var(--surface);
  border:1px solid var(--border);border-radius:12px;
}
.heatmap-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;flex-wrap:wrap;gap:6px}
.heatmap-head h3{margin:0;display:flex;align-items:center;gap:8px}
.heatmap-total{color:var(--muted);font-size:12.5px}
.heatmap-grid{display:flex;gap:3px;overflow-x:auto;padding-bottom:6px}
.hm-col{display:flex;flex-direction:column;gap:3px}
.hm-cell{width:12px;height:12px;border-radius:2px;background:rgba(255,255,255,.05);transition:transform .12s ease}
.hm-cell:hover{transform:scale(1.4);z-index:1}
.hm-empty{visibility:hidden}
.hm-0{background:rgba(120,120,140,.15)}
.hm-1{background:rgba(140,80,255,.32)}
.hm-2{background:rgba(140,80,255,.55)}
.hm-3{background:rgba(140,80,255,.78)}
.hm-4{background:rgba(140,80,255,1)}
.heatmap-legend{display:flex;align-items:center;gap:4px;margin-top:10px;font-size:11px;color:var(--muted)}
.heatmap-legend .hm-cell{cursor:default}

/* ════════════════════════════════════════════════ */
/* TOOL INVENTORY                                   */
/* ════════════════════════════════════════════════ */
.profile-tools{margin-top:10px}
.profile-tools-label{
  font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);
  display:flex;align-items:center;gap:5px;margin-bottom:5px;
}
.profile-tools-list{display:flex;flex-wrap:wrap;gap:5px}
.tool-pill{
  display:inline-block;padding:3px 9px;border-radius:100px;
  background:rgba(34,197,94,.12);color:#22c55e;font-size:11.5px;font-weight:600;
  border:1px solid rgba(34,197,94,.3);transition:transform .1s;
}
.tool-pill:hover{transform:translateY(-1px)}

/* ════════════════════════════════════════════════ */
/* PROJECT Q&A                                      */
/* ════════════════════════════════════════════════ */
.qna-section{
  margin:32px 0;padding:20px;background:var(--surface);
  border:1px solid var(--border);border-radius:14px;
}
.qna-section h3{margin:0 0 14px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.qna-ask{display:flex;gap:8px;align-items:center}
.qna-ask input{
  flex:1;padding:10px 12px;border:1px solid var(--border);border-radius:8px;
  background:var(--bg);color:var(--text);font-size:14px;
}
.qna-q{
  margin-top:14px;padding:14px;border-radius:10px;
  background:var(--bg);border:1px solid var(--border);
}
.qna-q-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.qna-q-head strong{font-size:14.5px;line-height:1.4;flex:1}
.qna-q-meta{font-size:11.5px;color:var(--muted);margin-top:4px}
.qna-answers{margin-top:10px;display:flex;flex-direction:column;gap:8px}
.qna-a{
  padding:10px 12px;border-radius:8px;
  background:var(--surface);border:1px solid var(--border);
}
.qna-a.is-accepted{
  background:rgba(34,197,94,.08);border-color:rgba(34,197,94,.4);
}
.qna-accepted{
  display:inline-flex;align-items:center;gap:4px;
  font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;
  color:#22c55e;margin-bottom:6px;
}
.qna-a-body{font-size:13.5px;line-height:1.55;white-space:pre-wrap}
.qna-a-meta{
  margin-top:8px;font-size:11.5px;color:var(--muted);
  display:flex;justify-content:space-between;align-items:center;gap:6px;flex-wrap:wrap;
}
.qna-inv-pill{
  background:rgba(140,80,255,.18);color:#a07cff;
  padding:1px 6px;border-radius:100px;font-size:10px;font-weight:700;
  text-transform:uppercase;letter-spacing:.04em;
}
.qna-accept-btn{
  background:rgba(34,197,94,.15);border:1px solid rgba(34,197,94,.4);
  color:#22c55e;padding:3px 8px;border-radius:100px;font-size:10.5px;
  font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:3px;
}
.qna-accept-btn:hover{background:rgba(34,197,94,.25)}
.qna-icon-btn{
  background:transparent;border:0;color:var(--muted);cursor:pointer;padding:2px 4px;
  border-radius:4px;
}
.qna-icon-btn:hover{background:rgba(239,68,68,.1);color:#ef4444}
.qna-no-a{color:var(--muted);font-size:12.5px;font-style:italic}
.qna-answer-form{margin-top:8px;display:flex;flex-direction:column;gap:6px}
.qna-answer-form textarea{
  width:100%;min-height:60px;padding:8px 10px;border:1px solid var(--border);
  border-radius:6px;background:var(--surface);color:var(--text);font-size:13px;
  font-family:inherit;resize:vertical;
}
.qna-answer-form button{align-self:flex-end}

/* Code blocks: highlight.js takes over color, just style the wrapper */
.code-block-view pre{padding:0!important;margin:0!important;background:transparent!important}
.code-block-view pre code.hljs{padding:14px;border-radius:8px;font-size:13px;line-height:1.55}

/* ════════════════════════════════════════════════ */
/* STEP FOCUS MODE                                  */
/* ════════════════════════════════════════════════ */
.step-focus-overlay{
  position:fixed;inset:0;background:var(--bg);z-index:1000;
  display:flex;flex-direction:column;
  animation:sf-in .2s ease-out;
}
@keyframes sf-in{from{opacity:0}to{opacity:1}}
.sf-bar{
  display:flex;align-items:center;gap:14px;padding:12px 18px;
  border-bottom:1px solid var(--border);background:var(--surface);
}
.sf-close{
  background:transparent;border:0;color:var(--muted);cursor:pointer;
  display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:600;
}
.sf-close:hover{color:var(--text)}
.sf-meta{flex:1;color:var(--muted);font-size:13px;text-align:center}
.sf-prog{
  width:140px;height:4px;background:rgba(140,80,255,.15);
  border-radius:100px;overflow:hidden;
}
.sf-prog-fill{height:100%;background:linear-gradient(90deg,#8c50ff,#ff50c8);transition:width .3s}
.sf-body{
  flex:1;overflow-y:auto;padding:32px 24px 100px;
  max-width:820px;margin:0 auto;width:100%;
}
.sf-body h2{font-size:32px;line-height:1.2;margin:0 0 24px}
.sf-content{font-size:18px;line-height:1.7}
.sf-content img{max-width:100%;border-radius:10px;margin:16px 0}
.sf-content pre code{font-size:15px}
.sf-content p{margin-bottom:16px}
.sf-nav{
  position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:center;
  align-items:center;gap:14px;padding:14px 18px;background:var(--surface);
  border-top:1px solid var(--border);
}
.sf-nav button:disabled{opacity:.4;cursor:not-allowed}

/* ════════════════════════════════════════════════ */
/* TOP CONTRIBUTORS WIDGET                          */
/* ════════════════════════════════════════════════ */
.top-contrib-card{
  margin:16px 0;padding:14px 18px;border-radius:12px;
  background:linear-gradient(135deg,rgba(140,80,255,.06),rgba(255,80,200,.04));
  border:1px solid var(--border);
}
.top-contrib-card h3{margin:0 0 10px;font-size:13px;font-weight:700;letter-spacing:.04em;color:var(--muted);text-transform:uppercase;display:flex;align-items:center;gap:6px}
.top-contrib-list{display:flex;gap:10px;overflow-x:auto;padding-bottom:4px}
.tc-row{
  display:flex;align-items:center;gap:8px;padding:6px 12px 6px 6px;
  background:var(--surface);border:1px solid var(--border);border-radius:100px;
  cursor:pointer;flex-shrink:0;transition:transform .12s, border-color .12s;
}
.tc-row:hover{transform:translateY(-2px);border-color:var(--accent2)}
.tc-rank{
  width:18px;height:18px;background:linear-gradient(135deg,#8c50ff,#ff50c8);
  color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:10px;font-weight:800;
}
.tc-avatar{width:24px;height:24px;border-radius:50%;object-fit:cover}
.tc-avatar-letter{
  background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:12px;
}
.tc-name{font-size:13px;font-weight:600}
.tc-count{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}

/* ════════════════════════════════════════════════ */
/* PRINT-FRIENDLY (Print to PDF / Save offline)     */
/* ════════════════════════════════════════════════ */
@media print {
  /* Hide nav, footer, mobile menu, share bar, build panel, comments,
     Q&A, related projects, build log form — keep ONLY the project
     content (title, cover, components, BOM, steps). */
  nav,#navbar,#site-footer,#mobile-menu,#mobile-menu-btn,
  .share-bar,.build-panel,.comments-section,.qna-section,
  .related-section,.project-updates-section,.imadeit-section,
  .builders-list,.inventor-card,.progress-section,
  .filter-bar,.section-header > div:not(.section-title),
  .nav-right,.back-btn,.tabs,.tab,.tag-chips,
  .bom-buy-row,.bom-buy,
  .step-ai-btn,.ai-explain-pop,#challenge-banner-slot,
  #top-contrib-slot,#feed-section,.home-tabs,.stats-bar,
  .hero,.streak-pill,.rank-badge,.follow-btn,
  .action-btn,#like-btn,
  #toast-container,.modal,.modal-overlay,
  .step-focus-overlay,.username-setup-overlay,
  .levelup-banner {
    display:none !important;
  }
  body{background:#fff !important;color:#000 !important;font-size:12pt}
  a{color:#000 !important;text-decoration:none}
  .step-card{break-inside:avoid;page-break-inside:avoid;border:1px solid #ddd;margin-bottom:14px}
  .project-page-header{margin-bottom:20px}
  .project-cover-banner{height:200px !important;margin-bottom:14px !important}
  pre code{font-size:10pt;page-break-inside:avoid}
  .bom-section,.components-list{page-break-inside:avoid}
}

/* ════════════════════════════════════════════════ */
/* PROFILE WORKSHOP BANNER                          */
/* ════════════════════════════════════════════════ */
.profile-workshop{
  margin:16px 0 24px;border-radius:12px;overflow:hidden;
  border:1px solid var(--border);position:relative;
}
.profile-workshop img{width:100%;height:200px;object-fit:cover;display:block}
.profile-workshop-caption{
  position:absolute;left:0;right:0;bottom:0;
  padding:12px 16px;background:linear-gradient(transparent, rgba(0,0,0,.7));
  color:#fff;font-size:13px;
}
.profile-workshop-empty{
  margin:16px 0 24px;padding:14px 18px;border-radius:12px;
  border:1px dashed var(--border);background:var(--surface);
  display:flex;align-items:center;gap:14px;cursor:pointer;
  color:var(--muted);transition:border-color .12s, color .12s;
}
.profile-workshop-empty:hover{border-color:var(--accent2);color:var(--text)}

/* ════════════════════════════════════════════════ */
/* PROFILE TAG CLOUD                                */
/* ════════════════════════════════════════════════ */
.profile-tag-cloud{
  margin:16px 0 20px;padding:12px 16px;border-radius:10px;
  background:var(--surface);border:1px solid var(--border);
}
.profile-tag-cloud-label{
  font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);
  display:flex;align-items:center;gap:5px;margin-bottom:8px;
}
.profile-tag-cloud-list{display:flex;flex-wrap:wrap;gap:8px;align-items:baseline}
.cloud-tag{
  display:inline-block;padding:2px 10px;border-radius:100px;
  background:rgba(140,80,255,.1);color:var(--text);
  border:1px solid rgba(140,80,255,.25);font-weight:600;
  transition:transform .12s, border-color .12s;
}
.cloud-tag:hover{transform:translateY(-2px);border-color:#a07cff}

/* ════════════════════════════════════════════════ */
/* DIFFICULTY CALIBRATION VOTE                       */
/* ════════════════════════════════════════════════ */
.diff-vote{
  flex:1;min-width:120px;padding:8px 10px;border-radius:8px;
  background:var(--bg);border:1px solid var(--border);color:var(--text);
  cursor:pointer;font-size:12.5px;transition:border-color .12s, background .12s;
}
.diff-vote:hover{border-color:var(--accent2)}
.diff-vote.is-picked{
  background:rgba(140,80,255,.15);border-color:#a07cff;color:#a07cff;font-weight:700;
}


