/* ==========================================================================
   BJJVerse — Modern Social App Design System
   - Primary UI Chrome: Clean Monochrome (#111827 ink on #FFFFFF / #F4F5F7)
   - Practitioner's Belt Color: Subtle Accent ONLY (Avatar ring, belt badge,
     subtle tags & highlights — never the dominant color of the app)
   ========================================================================== */

:root {
  color-scheme: light;
  --outer-bg: #E5E7EB;
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #F3F4F6;
  --surface-3: #E5E7EB;
  --header-bg: rgba(255, 255, 255, 0.94);

  /* Monochrome Primary Brand & UI Chrome */
  --ink: #111827;
  --ink-contrast: #FFFFFF;
  --text: #111827;
  --text-2: #374151;
  --muted: #6B7280;
  --line: #ECEEF2;
  --line-strong: #DCDFE6;

  /* Semantic Status */
  --ok: #059669;
  --ok-soft: #ECFDF5;
  --warn: #D97706;
  --warn-soft: #FFFBEB;
  --danger: #E11D48;
  --danger-soft: #FFF1F2;

  /* Subtle Belt Accent (Default: Muted Kimono Blue) */
  --accent: #3B66A8;
  --accent-soft: rgba(59, 102, 168, 0.1);
  --accent-border: rgba(59, 102, 168, 0.28);
  --belt-color: #3B66A8;
  --belt-tip: #111827;
}

[data-belt="blue"] {
  --accent: #3B66A8;
  --accent-soft: rgba(59, 102, 168, 0.1);
  --accent-border: rgba(59, 102, 168, 0.28);
  --belt-color: #3B66A8;
  --belt-tip: #111827;
}

[data-belt="purple"] {
  --accent: #6E4B9E;
  --accent-soft: rgba(110, 75, 158, 0.1);
  --accent-border: rgba(110, 75, 158, 0.28);
  --belt-color: #6E4B9E;
  --belt-tip: #111827;
}

[data-belt="brown"] {
  --accent: #825232;
  --accent-soft: rgba(130, 82, 50, 0.1);
  --accent-border: rgba(130, 82, 50, 0.28);
  --belt-color: #825232;
  --belt-tip: #111827;
}

[data-belt="black"] {
  --accent: #A62634;
  --accent-soft: rgba(166, 38, 52, 0.09);
  --accent-border: rgba(166, 38, 52, 0.28);
  --belt-color: #18181B;
  --belt-tip: #A62634;
}

[data-belt="white"] {
  --accent: #52525B;
  --accent-soft: rgba(82, 82, 91, 0.1);
  --accent-border: rgba(82, 82, 91, 0.26);
  --belt-color: #F4F4F5;
  --belt-tip: #18181B;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--outer-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

/* Mobile Phone Viewport */
.phone-frame {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Sticky Top App Bar (Clean Instagram / Threads style) */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 52px;
  padding: 0 16px;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.top-nav-left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-word {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.top-nav-center {
  display: flex;
  align-items: center;
}

.header-mode-pills {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--surface-2);
}

.mode-pill {
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.mode-pill.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.back-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 0;
}

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

/* User Pill — Belt Color is the Subtle Ring Accent */
.user-pill {
  height: 30px;
  padding: 0 9px 0 3px;
  border-radius: 999px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  color: var(--ink);
  font-size: 9.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.user-belt-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: capitalize;
}

/* Main Scrollable Area */
.screen-body {
  flex: 1;
  padding-bottom: 76px;
}

/* Practitioner Stories Bar (Instagram / Strava People Row) */
.stories-bar {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.stories-bar::-webkit-scrollbar {
  display: none;
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  width: 58px;
}

.story-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  padding: 2px;
  background: var(--line-strong);
  position: relative;
}

.story-ring.ring-blue { background: #3B66A8; }
.story-ring.ring-purple { background: #6E4B9E; }
.story-ring.ring-brown { background: #825232; }
.story-ring.ring-black { background: #A62634; }
.story-ring.ring-white { background: #A1A1AA; }
.story-ring.ring-me { background: var(--accent); }

.story-item.active .story-ring {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.story-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--surface);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.story-plus-badge {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  border: 2px solid var(--surface);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.story-item span {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58px;
}

/* Subtle Position Filter Chips */
.chip-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 9px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.chip-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.filter-chip.active {
  background: var(--ink);
  color: var(--ink-contrast);
  font-weight: 600;
}

/* Avatars with Subtle Belt Dot */
.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}

.avatar-belt-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.avatar-belt-dot.belt-white { background: #D4D4D8; }
.avatar-belt-dot.belt-blue { background: #3B66A8; }
.avatar-belt-dot.belt-purple { background: #6E4B9E; }
.avatar-belt-dot.belt-brown { background: #825232; }
.avatar-belt-dot.belt-black { background: #18181B; }

/* ==========================================================================
   Social Feed Post Card (Instagram / Strava / TikTok Clean Layout)
   ========================================================================== */
.social-post {
  background: var(--surface);
  margin-bottom: 8px;
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--line);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 10px;
}

.post-author-meta {
  flex: 1;
  min-width: 0;
}

.post-author-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-author-line strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.rank-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  text-transform: capitalize;
}

.post-subline {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
}

.post-type-badge.help {
  background: var(--warn-soft);
  color: var(--warn);
}

/* Visual Technique / Reel Stage */
.visual-stage {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 10px;
  border-radius: 14px;
  overflow: hidden;
  background: #161920;
  color: #F9FAFB;
  text-align: left;
  position: relative;
}

.stage-graphic {
  height: 176px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 82% 22%, rgba(255, 255, 255, 0.08), transparent 58%), #181B22;
}

.stage-svg-bg {
  position: absolute;
  right: -8px;
  bottom: -12px;
  width: 175px;
  height: 175px;
  opacity: 0.14;
  pointer-events: none;
}

.stage-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.stage-pos-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
}

.stage-duration {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stage-bottom-overlay {
  position: relative;
  z-index: 2;
}

.stage-kicker {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.68);
  display: block;
  margin-bottom: 3px;
}

.stage-headline {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: #FFFFFF;
  display: block;
}

.stage-steps-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stage-step-cell {
  background: #12151B;
  padding: 8px 10px;
  font-size: 11px;
  color: #D1D5DB;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-step-cell b {
  color: #FFFFFF;
  margin-right: 4px;
}

/* Social Action Row */
.social-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 2px 16px 8px;
}

.act-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  padding: 4px 0;
}

.act-btn.liked {
  color: var(--danger);
}

.act-btn.saved {
  color: var(--accent);
}

/* Belt Accent Pill CTA */
.act-btn-right {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.post-caption {
  padding: 0 16px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text);
  margin: 0;
}

.post-caption strong {
  font-weight: 600;
  margin-right: 5px;
}

.comments-box {
  margin: 10px 16px 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.comment-bubble {
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 12.5px;
}

.comment-bubble strong {
  font-size: 12px;
  margin-right: 6px;
}

.comment-bubble p {
  margin: 2px 0 0;
  color: var(--text-2);
}

.comment-input-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.comment-input-row input {
  flex: 1;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  font-size: 12.5px;
}

/* ==========================================================================
   Explore ("Sea of Information") & Problem Hub
   ========================================================================== */
.search-bar-wrap {
  padding: 12px 16px 6px;
  background: var(--surface);
}

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

.search-field svg {
  position: absolute;
  left: 12px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid transparent;
  font-size: 13.5px;
  color: var(--text);
}

.search-field input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.section-title-row button {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}

.problem-card-list {
  padding: 0 16px;
  display: grid;
  gap: 10px;
}

.problem-hub-card {
  width: 100%;
  text-align: left;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: block;
}

.phc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.pos-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
}

.phc-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 4px;
}

.phc-blurb {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.phc-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--surface);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-2);
  display: grid;
  place-items: center;
  margin-left: -6px;
}

.avatar-stack span:first-child {
  margin-left: 0;
}

/* Problem Hub View */
.hub-hero {
  padding: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.hub-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 8px 0 6px;
}

.hub-blurb {
  font-size: 13.5px;
  color: var(--text-2);
  margin: 0 0 12px;
}

.hub-community-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
}

.hub-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.feed-tabs {
  display: flex;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  gap: 22px;
}

.feed-tab {
  height: 42px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feed-tab.active {
  color: var(--ink);
}

.feed-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--ink);
}

.tab-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
}

.btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn.primary {
  background: var(--ink);
  color: var(--ink-contrast);
}

.btn.secondary {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn.active-state {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

.btn.full {
  width: 100%;
  height: 42px;
}

.steps-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 16px 14px;
  scrollbar-width: none;
}

.steps-carousel::-webkit-scrollbar {
  display: none;
}

.step-card {
  flex: 0 0 245px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.step-card-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 8px;
}

.step-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.hub-section {
  padding: 10px 16px;
}

.hub-card {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.hub-card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

.technique-cards {
  display: grid;
  gap: 8px;
}

.technique-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.technique-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.technique-card strong {
  font-size: 14px;
}

.technique-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-2);
}

.mistake-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
}

/* Profile & Belt Accent Configuration */
.profile-hero {
  padding: 18px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.avatar-lg {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2.5px solid var(--accent);
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.stat-box {
  padding: 10px;
  border-radius: 10px;
  background: var(--surface-2);
  text-align: center;
}

.stat-box strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.stat-box span {
  font-size: 11px;
  color: var(--muted);
}

.belt-bar-visual {
  display: flex;
  height: 14px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--belt-color);
  border: 1px solid var(--line-strong);
  margin: 12px 0 4px;
}

.belt-bar-visual .b-fill {
  flex: 1;
  background: var(--belt-color);
}

.belt-bar-visual .b-tip {
  width: 80px;
  background: var(--belt-tip);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 0 10px;
}

.belt-bar-visual .b-tip i {
  width: 3px;
  height: 100%;
  background: #FFFFFF;
  display: block;
}

.belt-picker-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 8px 0 14px;
}

.belt-choice {
  padding: 10px 4px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.belt-choice.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.belt-swatch-mini {
  width: 32px;
  height: 10px;
  border-radius: 3px;
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.belt-swatch-mini .s-main { flex: 1; }
.belt-swatch-mini .s-tip { width: 9px; background: #111; }

.belt-choice[data-belt="white"] .s-main { background: #F4F4F5; }
.belt-choice[data-belt="blue"] .s-main { background: #3B66A8; }
.belt-choice[data-belt="purple"] .s-main { background: #6E4B9E; }
.belt-choice[data-belt="brown"] .s-main { background: #825232; }
.belt-choice[data-belt="black"] .s-main { background: #18181B; }
.belt-choice[data-belt="black"] .s-tip { background: #A62634; }

.belt-choice span {
  font-size: 11.5px;
  font-weight: 600;
}

.stripes-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.stripe-chip {
  height: 34px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}

.stripe-chip.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.form-pad {
  padding: 16px;
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

.input, .textarea, .select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 14px;
}

.input, .select {
  height: 42px;
}

.textarea {
  min-height: 88px;
  resize: vertical;
}

.composer-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

/* Sticky 6-Tab Bottom Navigation Bar (Home, Verse, Explore, +, Saved, Profile) */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
  z-index: 40;
}

/* ==========================================================================
   BJJ Universe ("Verse") Interactive Graph & Node Card Sheet
   ========================================================================== */
.universe-top-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}

.cluster-mode-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cluster-mode-row::-webkit-scrollbar {
  display: none;
}

.cluster-pill {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cluster-pill.active {
  background: var(--ink);
  color: var(--ink-contrast);
}

.universe-stage-wrap {
  position: relative;
  width: 100%;
  height: 375px;
  background: radial-gradient(circle at 50% 45%, #131B2E 0%, #090D16 78%);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  user-select: none;
  touch-action: none;
}

.universe-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.universe-canvas:active {
  cursor: grabbing;
}

.universe-hud-top {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 5;
}

.hud-badge {
  pointer-events: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  color: #E2E8F0;
  font-size: 11px;
  font-weight: 600;
}

.hud-controls {
  pointer-events: auto;
  display: flex;
  gap: 5px;
}

.hud-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  color: #F8FAFC;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.universe-hud-bottom {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 5;
}

.universe-hud-bottom::-webkit-scrollbar {
  display: none;
}

.node-quick-chip {
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #CBD5E1;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.node-quick-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

/* Selected Node Detail Drawer / Card Deck */
.node-sheet {
  background: var(--bg);
  padding-bottom: 16px;
}

.node-sheet-header {
  background: var(--surface);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.node-sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.node-cluster-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.node-sheet-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}

.node-sheet-summary {
  font-size: 13px;
  color: var(--text-2);
  margin: 0 0 10px;
}

.node-principle-box {
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  font-size: 12.5px;
  color: var(--text);
  margin-bottom: 12px;
}

.node-principle-box strong {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 2px;
}

.transition-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.transition-strip::-webkit-scrollbar {
  display: none;
}

.transition-chip {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11.5px;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.transition-chip strong {
  color: var(--ink);
  font-weight: 600;
}

.transition-chip em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  height: 100%;
}

.tab-btn.active {
  color: var(--ink);
}

.tab-btn-post {
  display: grid;
  place-items: center;
  height: 100%;
}

.fab-plus {
  width: 38px;
  height: 30px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--ink-contrast);
  display: grid;
  place-items: center;
}

.empty-state {
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
}

/* Prevent floating host watermark iframe from covering mobile bottom navigation */
#nl-badge-frame,
#nl-hud-frame,
iframe[title="Powered by Netlify"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}
