/* ═══════════════════════════════════════════════════════════════
   CSS VARIABLES & RESET
   ═══════════════════════════════════════════════════════════════ */
:root {
  --gold-bright: #ffd644;
  --gold-mid: #c9a84c;
  --gold-dim: #8b7340;
  --gold-dark: #5c4a2a;
  --gold-deep: #3d3220;
  --panel-bg: #0c0a07;
  --panel-inner: #12100b;
  --leather: #1a1610;
  --parchment: #d4c5a0;
  --track-adventurer: #1eff00;
  --track-veteran: #0070dd;
  --track-champion: #a335ee;
  --track-hero: #ff8000;
  --track-myth: #ff3f3f;
  --track-unranked: #9d9d9d;
}

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

html {
  background: #050403;
  min-height: 100vh;
}

body {
  font-family: 'Crimson Pro', serif;
  color: var(--parchment);
  display: flex;
  justify-content: center;
  padding: 24px 12px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(90,70,30,0.10) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(60,40,20,0.08) 0%, transparent 60%),
    #050403;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes shimmerSweep {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes rowReveal {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes particleFloat {
  0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-420px) translateX(30px) scale(0.3); opacity: 0; }
}
@keyframes panelFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 4px rgba(255,214,68,0.3); }
  50% { box-shadow: 0 0 12px rgba(255,214,68,0.6); }
}

/* ═══════════════════════════════════════════════════════════════
   FRAME SYSTEM
   ═══════════════════════════════════════════════════════════════ */
.frame-outer {
  max-width: 1100px;
  width: 100%;
  position: relative;
  animation: panelFadeIn 0.6s ease-out;
}

.frame-border {
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-image: linear-gradient(
    180deg,
    #d4a84a 0%, #f0d078 15%, #c49838 30%,
    #8b6d2f 50%,
    #c49838 70%, #f0d078 85%, #d4a84a 100%
  ) 1;
  pointer-events: none;
  z-index: 2;
}

.rivet {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0d078, #a07828 60%, #6b5520);
  box-shadow: 0 0 3px rgba(0,0,0,0.6), inset 0 0.5px 1px rgba(255,240,180,0.4);
  z-index: 3;
  pointer-events: none;
}
.rivet-tl { top: -4px; left: -4px; }
.rivet-tr { top: -4px; right: -4px; }
.rivet-bl { bottom: -4px; left: -4px; }
.rivet-br { bottom: -4px; right: -4px; }
.rivet-tc { top: -4px; left: 50%; transform: translateX(-50%); }
.rivet-bc { bottom: -4px; left: 50%; transform: translateX(-50%); }
.rivet-ml { top: 50%; left: -4px; transform: translateY(-50%); }
.rivet-mr { top: 50%; right: -4px; transform: translateY(-50%); }

.corner-ornament {
  position: absolute;
  width: 28px; height: 28px;
  z-index: 3;
  pointer-events: none;
}
.corner-ornament-tl { top: -2px; left: -2px; }
.corner-ornament-tr { top: -2px; right: -2px; transform: scaleX(-1); }
.corner-ornament-bl { bottom: -2px; left: -2px; transform: scaleY(-1); }
.corner-ornament-br { bottom: -2px; right: -2px; transform: scale(-1, -1); }

/* ═══════════════════════════════════════════════════════════════
   PANEL (Main Content Area)
   ═══════════════════════════════════════════════════════════════ */
.panel {
  position: relative;
  background: var(--panel-bg);
  padding: 28px 24px 18px;
  overflow: hidden;
  z-index: 1;
}

.panel::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.panel::after {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='l'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.04' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23l)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.panel-bevel {
  position: absolute; inset: 3px;
  border-top: 1px solid rgba(201,168,76,0.15);
  border-left: 1px solid rgba(201,168,76,0.10);
  border-bottom: 1px solid rgba(0,0,0,0.4);
  border-right: 1px solid rgba(0,0,0,0.3);
  pointer-events: none;
  z-index: 1;
}

.panel > * { position: relative; z-index: 1; }

/* Particles */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.particle {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: rgba(255, 214, 68, 0.25);
  animation: particleFloat linear infinite;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.header { text-align: center; margin-bottom: 4px; }

.header h1 {
  font-family: 'Uncial Antiqua', cursive;
  font-size: 26px;
  font-weight: 400;
  background: linear-gradient(180deg, #ffeaa0 0%, #d4a84a 40%, #a07828 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(160,120,40,0.3));
  line-height: 1.2;
  margin-bottom: 2px;
}

.header .subtitle {
  font-family: 'MedievalSharp', cursive;
  color: var(--gold-dim);
  font-size: 11.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════
   DIVIDERS
   ═══════════════════════════════════════════════════════════════ */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
  position: relative;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark) 20%, var(--gold-dim) 50%, var(--gold-dark) 80%, transparent);
}
.divider-gem {
  width: 8px; height: 8px;
  background: linear-gradient(135deg, #f0d078, #a07828);
  transform: rotate(45deg);
  box-shadow: 0 0 6px rgba(201,168,76,0.3);
  flex-shrink: 0;
}
.divider-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--gold-dark);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   TOP-LEVEL TABS
   ═══════════════════════════════════════════════════════════════ */
.top-tabs {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.tab {
  padding: 9px 16px 11px;
  background: linear-gradient(180deg, rgba(30,26,18,0.9) 0%, rgba(18,16,11,0.95) 100%);
  border: 1px solid var(--gold-deep);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  color: #6b5f48;
  font-family: 'Crimson Pro', serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  transition: color 0.2s, background 0.2s;
  user-select: none;
}
.tab:hover { color: var(--gold-mid); }

.tab.active {
  color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(60,48,24,0.5) 0%, rgba(18,16,11,0.2) 100%);
  border-color: var(--gold-dim);
  text-shadow: 0 0 10px rgba(255,214,68,0.3), 0 1px 2px rgba(0,0,0,0.8);
}
.tab.active::before {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright) 30%, var(--gold-bright) 70%, transparent);
}

.tab-bar-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark) 10%, var(--gold-dim) 50%, var(--gold-dark) 90%, transparent);
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   SUB-TABS (Gear Guide)
   ═══════════════════════════════════════════════════════════════ */
.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 6px;
}
.sub-tab {
  padding: 6px 10px 7px;
  background: linear-gradient(180deg, rgba(30,26,18,0.85), rgba(18,16,11,0.95));
  border: 1px solid var(--gold-deep);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  color: #6b5f48;
  font-family: 'Crimson Pro', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  user-select: none;
}
.sub-tab:hover { color: var(--gold-mid); }
.sub-tab.active {
  color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(60,48,24,0.4), rgba(18,16,11,0.15));
  border-color: var(--gold-dim);
  text-shadow: 0 0 8px rgba(255,214,68,0.25);
}
.sub-tab.active::before {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright) 30%, var(--gold-bright) 70%, transparent);
}

.sub-tab-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark) 10%, var(--gold-dim) 50%, var(--gold-dark) 90%, transparent);
  margin-bottom: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   GEAR GUIDE ROWS
   ═══════════════════════════════════════════════════════════════ */
.gear-content-panel { display: none; }
.gear-content-panel.active { display: block; }

.section-label {
  font-family: 'Crimson Pro', serif;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gold-dark);
  margin: 14px 0 6px;
  padding-bottom: 3px;
  background: linear-gradient(90deg, rgba(139,115,64,0.2), transparent);
  padding-left: 6px;
}

.gear-row {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  margin-bottom: 2px;
  background: linear-gradient(90deg, rgba(26,22,16,0.6), rgba(18,16,11,0.3));
  border: 1px solid rgba(92,74,42,0.15);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  animation: rowReveal 0.3s ease-out backwards;
  position: relative;
}
.gear-row:hover {
  background: linear-gradient(90deg, rgba(40,32,18,0.7), rgba(26,22,16,0.4));
  border-color: rgba(139,115,64,0.3);
}
.gear-row.expanded {
  border-color: var(--gold-dim);
  background: linear-gradient(90deg, rgba(50,40,22,0.5), rgba(30,26,18,0.3));
}
.gear-row.shimmer {
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(255,214,68,0.04) 40%,
      rgba(255,214,68,0.08) 50%,
      rgba(255,214,68,0.04) 60%,
      transparent 100%)
    no-repeat;
  background-size: 200% 100%;
  animation: shimmerSweep 2.5s ease-in-out infinite, rowReveal 0.3s ease-out backwards;
}

.gear-row .track-color {
  width: 4px;
  height: 24px;
  border-radius: 2px;
  margin-right: 10px;
  flex-shrink: 0;
}

.gear-row .gear-track-name {
  font-family: 'MedievalSharp', cursive;
  font-size: 12.5px;
  margin-right: 8px;
  min-width: 80px;
}

.gear-row .gear-ilvl {
  font-family: 'Crimson Pro', serif;
  font-size: 14px;
  font-weight: 700;
  margin-right: 12px;
  min-width: 32px;
}

.gear-row .gear-source {
  font-family: 'Crimson Pro', serif;
  font-size: 12px;
  color: #9d9080;
  flex: 1;
}

.gear-row .gear-arrow {
  font-size: 10px;
  color: var(--gold-dark);
  transition: transform 0.2s;
  margin-left: 8px;
}
.gear-row.expanded .gear-arrow { transform: rotate(90deg); color: var(--gold-mid); }

/* Vault pips */
.vault-pips {
  display: flex;
  gap: 4px;
  margin-left: auto;
  margin-right: 10px;
}
.vault-pip {
  width: 8px; height: 8px;
  transform: rotate(45deg);
  border: 1px solid var(--gold-dark);
  background: transparent;
  transition: background 0.2s;
}
.vault-pip.filled {
  background: var(--gold-bright);
  border-color: var(--gold-mid);
  box-shadow: 0 0 4px rgba(255,214,68,0.3);
}

/* Crest expansion cards */
.crest-card {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
  opacity: 0;
  margin: 0 0 2px 14px;
  border-left: 3px solid var(--gold-dark);
  background: rgba(18,16,11,0.8);
  border-radius: 0 3px 3px 0;
}
.crest-card.open {
  max-height: 400px;
  opacity: 1;
  padding: 10px 14px;
}

.crest-inner {
  font-size: 12px;
  line-height: 1.6;
}
.crest-inner .crest-title {
  font-family: 'MedievalSharp', cursive;
  font-size: 13px;
  margin-bottom: 6px;
}
.crest-inner .crest-stat {
  color: #9d9080;
  font-size: 11px;
}
.crest-inner .crest-stat b {
  color: var(--parchment);
  font-weight: 600;
}
.crest-inner .crest-sources {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(92,74,42,0.2);
}
.crest-inner .crest-sources li {
  list-style: none;
  padding-left: 12px;
  position: relative;
  font-size: 11px;
  color: #9d9080;
  line-height: 1.8;
}
.crest-inner .crest-sources li::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 4px; height: 4px;
  transform: translateY(-50%) rotate(45deg);
  background: var(--gold-dark);
}

/* ═══════════════════════════════════════════════════════════════
   ROADMAP LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.roadmap-layout {
  display: flex;
  gap: 0;
  min-height: 500px;
}

/* Sidebar */
.rm-sidebar {
  width: 220px;
  min-width: 220px;
  background: rgba(18,16,11,0.6);
  border-right: 1px solid var(--gold-deep);
  padding: 12px 0;
  flex-shrink: 0;
  overflow-y: auto;
  max-height: 72vh;
}
.rm-sidebar::-webkit-scrollbar { width: 5px; }
.rm-sidebar::-webkit-scrollbar-track { background: transparent; }
.rm-sidebar::-webkit-scrollbar-thumb { background: var(--gold-deep); border-radius: 3px; }

.rm-sidebar-title {
  font-family: 'MedievalSharp', cursive;
  font-size: 11px;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-align: center;
  margin-bottom: 10px;
}

.rm-week-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
  user-select: none;
}
.rm-week-entry:hover { background: rgba(60,50,32,0.2); }
.rm-week-entry.active { background: rgba(60,50,32,0.35); }

.rm-week-dot {
  width: 12px; height: 12px;
  transform: rotate(45deg);
  border: 1.5px solid var(--gold-dark);
  background: transparent;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
  position: relative;
  z-index: 2;
}
.rm-week-dot.partial {
  background: var(--gold-mid);
  border-color: var(--gold-mid);
}
.rm-week-dot.complete {
  background: var(--track-adventurer);
  border-color: var(--track-adventurer);
  box-shadow: 0 0 6px rgba(30,255,0,0.3);
}

.rm-week-info {
  flex: 1;
  min-width: 0;
}
.rm-week-name {
  font-family: 'Crimson Pro', serif;
  font-size: 12px;
  font-weight: 600;
  color: #6b5f48;
  line-height: 1.2;
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rm-week-entry.active .rm-week-name { color: var(--gold-bright); }

.rm-week-dates {
  font-size: 10px;
  color: #504838;
  line-height: 1.2;
}

.rm-now-badge {
  font-family: 'Crimson Pro', serif;
  font-size: 9px;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(255,214,68,0.15);
  border: 1px solid var(--gold-dim);
  border-radius: 3px;
  padding: 1px 5px;
  letter-spacing: 1px;
  animation: pulseGlow 2s ease-in-out infinite;
  flex-shrink: 0;
}

/* Timeline connecting line */
.rm-week-entry::before {
  content: '';
  position: absolute;
  left: 19px;
  top: -1px;
  bottom: -1px;
  width: 1px;
  background: var(--gold-deep);
  z-index: 1;
}
.rm-week-entry:first-child::before { top: 50%; }
.rm-week-entry:last-child::before { bottom: 50%; }

/* Roadmap Main */
.rm-main {
  flex: 1;
  padding: 14px 18px;
  overflow-y: auto;
  max-height: 72vh;
  min-width: 0;
}
.rm-main::-webkit-scrollbar { width: 6px; }
.rm-main::-webkit-scrollbar-track { background: rgba(18,16,11,0.5); }
.rm-main::-webkit-scrollbar-thumb { background: var(--gold-deep); border-radius: 3px; }

/* Week header */
.rm-week-header {
  margin-bottom: 14px;
}
.rm-week-header h2 {
  font-family: 'MedievalSharp', cursive;
  font-size: 20px;
  color: var(--gold-bright);
  text-shadow: 0 0 10px rgba(255,214,68,0.2);
  margin-bottom: 2px;
}
.rm-week-header .rm-date-range {
  font-size: 12px;
  color: var(--gold-dim);
}

/* Unlock tags */
.rm-unlocks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.rm-unlock-tag {
  font-size: 11px;
  color: var(--parchment);
  background: rgba(26,22,16,0.7);
  border: 1px solid var(--gold-dark);
  border-left: 3px solid var(--gold-dim);
  border-radius: 3px;
  padding: 3px 9px;
  line-height: 1.3;
}

/* Task categories */
.rm-category-label {
  font-family: 'Crimson Pro', serif;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gold-dark);
  margin: 14px 0 6px;
  padding-bottom: 3px;
  padding-left: 6px;
  background: linear-gradient(90deg, rgba(139,115,64,0.2), transparent);
}
.rm-category-label.important { color: var(--track-myth); background: linear-gradient(90deg, rgba(255,63,63,0.1), transparent); }

/* Task items */
.rm-task {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 10px;
  margin-bottom: 2px;
  background: linear-gradient(90deg, rgba(26,22,16,0.4), rgba(18,16,11,0.2));
  border: 1px solid rgba(92,74,42,0.1);
  border-radius: 3px;
  transition: background 0.15s;
  animation: rowReveal 0.3s ease-out backwards;
}
.rm-task:hover {
  background: linear-gradient(90deg, rgba(40,32,18,0.5), rgba(26,22,16,0.3));
}
.rm-task.checked { opacity: 0.55; }
.rm-task.important-task .rm-task-text { color: var(--track-myth); font-weight: 600; }

/* Diamond checkbox */
.rm-checkbox {
  width: 16px; height: 16px;
  min-width: 16px;
  transform: rotate(45deg);
  border: 1.5px solid var(--gold-dark);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-top: 2px;
  flex-shrink: 0;
}
.rm-checkbox:hover { border-color: var(--gold-mid); }
.rm-checkbox.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
.rm-checkbox.checked {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: 0 0 6px rgba(255,214,68,0.3);
}

.rm-task-content { flex: 1; min-width: 0; }

.rm-task-text {
  font-family: 'Crimson Pro', serif;
  font-size: 13px;
  color: var(--parchment);
  line-height: 1.4;
}
.rm-task.checked .rm-task-text { text-decoration: line-through; color: #6b5f48; }

.rm-details-toggle {
  font-size: 10px;
  color: var(--gold-dim);
  cursor: pointer;
  display: inline-block;
  margin-top: 2px;
  transition: color 0.15s;
  user-select: none;
}
.rm-details-toggle:hover { color: var(--gold-bright); }

.rm-details-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.25s ease;
  opacity: 0;
  margin-top: 0;
  border-left: 3px solid var(--gold-dark);
  background: rgba(18,16,11,0.6);
  border-radius: 0 3px 3px 0;
  padding: 0 10px;
}
.rm-details-panel.open {
  max-height: 300px;
  opacity: 1;
  padding: 8px 10px;
  margin-top: 6px;
}
.rm-details-panel p {
  font-size: 12px;
  color: #9d9080;
  line-height: 1.5;
  margin-bottom: 4px;
}
.rm-details-panel a {
  color: var(--gold-mid);
  font-size: 11px;
  text-decoration: none;
}
.rm-details-panel a:hover { color: var(--gold-bright); text-decoration: underline; }

/* Renown badge */
.renown-badge {
  display: inline-block;
  font-family: 'Crimson Pro', serif;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  margin-left: 8px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  color: var(--gold-dim);
  vertical-align: middle;
}
.renown-badge.met {
  color: #4ade80;
  background: rgba(74,222,128,0.1);
}

/* ═══════════════════════════════════════════════════════════════
   CREST BUDGET TRACKER
   ═══════════════════════════════════════════════════════════════ */
.rm-section-title {
  font-family: 'MedievalSharp', cursive;
  font-size: 14px;
  color: var(--gold-mid);
  margin: 18px 0 8px;
  padding-left: 2px;
}
.rm-avg-ilvl {
  font-family: 'Crimson Pro', serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 8px;
}
.rm-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  font-size: 10px;
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  color: var(--gold-dim);
  margin-left: 6px;
  cursor: help;
  position: relative;
  vertical-align: middle;
}
.rm-info-icon:hover { border-color: var(--gold-mid); color: var(--gold-mid); }
.rm-info-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  background: var(--panel-bg);
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  padding: 8px 10px;
  font-family: 'Crimson Pro', serif;
  font-style: normal;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-body);
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  pointer-events: none;
}
.rm-info-icon:hover .rm-info-tooltip { display: block; }

.rm-crest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.rm-crest-card {
  background: rgba(18,16,11,0.7);
  border: 1px solid var(--gold-deep);
  border-radius: 4px;
  padding: 12px;
}
.rm-crest-card .crest-label {
  font-family: 'MedievalSharp', cursive;
  font-size: 13px;
  margin-bottom: 8px;
}
.rm-crest-card.hero-card { border-left: 3px solid var(--track-hero); }
.rm-crest-card.hero-card .crest-label { color: var(--track-hero); }
.rm-crest-card.myth-card { border-left: 3px solid var(--track-myth); }
.rm-crest-card.myth-card .crest-label { color: var(--track-myth); }

.crest-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.crest-btn {
  width: 24px; height: 24px;
  background: rgba(26,22,16,0.8);
  border: 1px solid var(--gold-dark);
  border-radius: 3px;
  color: var(--gold-mid);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
  font-family: 'Crimson Pro', serif;
}
.crest-btn:hover { border-color: var(--gold-mid); color: var(--gold-bright); }

.crest-input {
  width: 55px;
  background: rgba(12,10,7,0.8);
  border: 1px solid var(--gold-deep);
  border-radius: 3px;
  color: var(--parchment);
  font-family: 'Crimson Pro', serif;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 2px 4px;
  outline: none;
}
.crest-input:focus { border-color: var(--gold-dim); }

.crest-bar-bg {
  height: 8px;
  background: rgba(12,10,7,0.8);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.crest-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.hero-card .crest-bar-fill { background: linear-gradient(90deg, var(--track-hero), #ffaa44); }
.myth-card .crest-bar-fill { background: linear-gradient(90deg, var(--track-myth), #ff7777); }

.crest-stats {
  font-size: 11px;
  color: #6b5f48;
  display: flex;
  justify-content: space-between;
}
.crest-stats b { color: var(--parchment); font-weight: 600; }
.crest-note {
  font-size: 10px;
  color: #504838;
  margin-top: 4px;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   TARGET GEAR SECTION
   ═══════════════════════════════════════════════════════════════ */
.rm-target-gear {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.rm-target-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid;
  background: rgba(18,16,11,0.7);
  position: relative;
  cursor: help;
}

/* Target gear source tooltip */
.rm-target-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 260px;
  width: max-content;
  background: var(--panel-bg);
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  padding: 6px 10px;
  font-family: 'Crimson Pro', serif;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--parchment);
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  pointer-events: none;
  white-space: nowrap;
  text-align: center;
}
.rm-target-tag:hover .rm-target-tooltip { display: block; }

/* ═══════════════════════════════════════════════════════════════
   GEAR SLOT TRACKER
   ═══════════════════════════════════════════════════════════════ */
.rm-avg-ilvl {
  text-align: center;
  margin-bottom: 12px;
}
.rm-avg-ilvl .avg-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-dark);
}
.rm-avg-ilvl .avg-number {
  font-family: 'Uncial Antiqua', cursive;
  font-size: 32px;
  background: linear-gradient(180deg, #ffeaa0 0%, #d4a84a 40%, #a07828 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(160,120,40,0.3));
}

.rm-gear-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.rm-gear-slot {
  background: rgba(18,16,11,0.6);
  border: 1px solid var(--gold-deep);
  border-radius: 3px;
  padding: 8px;
  text-align: center;
}
.rm-gear-slot .slot-name {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gold-dark);
  margin-bottom: 4px;
}
.rm-gear-slot .slot-ilvl {
  font-family: 'Crimson Pro', serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  min-height: 22px;
}
.rm-gear-slot select {
  width: 100%;
  background: rgba(12,10,7,0.8);
  border: 1px solid var(--gold-deep);
  border-radius: 2px;
  color: var(--parchment);
  font-family: 'Crimson Pro', serif;
  font-size: 10.5px;
  padding: 2px 3px;
  margin-bottom: 2px;
  outline: none;
  cursor: pointer;
  appearance: auto;
}
.rm-gear-slot select:focus { border-color: var(--gold-dim); }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
  text-align: center;
  font-size: 10px;
  color: #3d3220;
  margin-top: 4px;
}

.reset-btn {
  display: inline-block;
  font-family: 'Crimson Pro', serif;
  font-size: 10px;
  color: #504838;
  cursor: pointer;
  border: 1px solid rgba(92,74,42,0.2);
  border-radius: 3px;
  padding: 2px 8px;
  margin-top: 6px;
  background: transparent;
  transition: color 0.15s, border-color 0.15s;
}
.reset-btn:hover { color: var(--track-myth); border-color: var(--track-myth); }
.reset-btn.demo-active { color: var(--gold-bright); border-color: var(--gold-dim); }

/* Track color utilities */
.tc-unranked { color: var(--track-unranked) !important; }
.tc-adventurer { color: var(--track-adventurer) !important; }
.tc-veteran { color: var(--track-veteran) !important; }
.tc-champion { color: var(--track-champion) !important; }
.tc-hero { color: var(--track-hero) !important; }
.tc-myth { color: var(--track-myth) !important; }

.bg-unranked { background-color: var(--track-unranked) !important; }
.bg-adventurer { background-color: var(--track-adventurer) !important; }
.bg-veteran { background-color: var(--track-veteran) !important; }
.bg-champion { background-color: var(--track-champion) !important; }
.bg-hero { background-color: var(--track-hero) !important; }
.bg-myth { background-color: var(--track-myth) !important; }

.bc-unranked { border-color: var(--track-unranked) !important; }
.bc-adventurer { border-color: var(--track-adventurer) !important; }
.bc-veteran { border-color: var(--track-veteran) !important; }
.bc-champion { border-color: var(--track-champion) !important; }
.bc-hero { border-color: var(--track-hero) !important; }
.bc-myth { border-color: var(--track-myth) !important; }

/* View switching */
.view { display: none; }
.view.active { display: block; }

/* ═══════════════════════════════════════════════════════════════
   CREST ROADMAP TAB
   ═══════════════════════════════════════════════════════════════ */
.cr-path-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 10px;
}
.cr-path-btn {
  padding: 5px 16px;
  font-family: 'Crimson Pro', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #6b5f48;
  background: rgba(18,16,11,0.6);
  border: 1px solid var(--gold-deep);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  user-select: none;
}
.cr-path-btn:first-child { border-radius: 4px 0 0 4px; }
.cr-path-btn:last-child { border-radius: 0 4px 4px 0; border-left: none; }
.cr-path-btn:hover { color: var(--gold-mid); }
.cr-path-btn.active {
  color: var(--gold-bright);
  background: rgba(60,48,24,0.35);
  border-color: var(--gold-dim);
  text-shadow: 0 0 8px rgba(255,214,68,0.2);
}

.cr-layout {
  display: flex;
  gap: 0;
  min-height: 500px;
}

/* Sidebar */
.cr-sidebar {
  width: 220px;
  min-width: 220px;
  background: rgba(18,16,11,0.6);
  border-right: 1px solid var(--gold-deep);
  padding: 12px 0;
  flex-shrink: 0;
  overflow-y: auto;
  max-height: 72vh;
}
.cr-sidebar::-webkit-scrollbar { width: 5px; }
.cr-sidebar::-webkit-scrollbar-track { background: transparent; }
.cr-sidebar::-webkit-scrollbar-thumb { background: var(--gold-deep); border-radius: 3px; }

.cr-sidebar-title {
  font-family: 'MedievalSharp', cursive;
  font-size: 11px;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-align: center;
  margin-bottom: 10px;
}

.cr-week-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
  user-select: none;
}
.cr-week-entry:hover { background: rgba(60,50,32,0.2); }
.cr-week-entry.active { background: rgba(60,50,32,0.35); }

.cr-week-entry::before {
  content: '';
  position: absolute;
  left: 17px;
  top: -1px;
  bottom: -1px;
  width: 1px;
  background: var(--gold-deep);
  z-index: 1;
}
.cr-week-entry:first-child::before { top: 50%; }
.cr-week-entry:last-child::before { bottom: 50%; }

.cr-week-info {
  flex: 1;
  min-width: 0;
}
.cr-week-name {
  font-family: 'Crimson Pro', serif;
  font-size: 11.5px;
  font-weight: 600;
  color: #6b5f48;
  line-height: 1.2;
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cr-week-entry.active .cr-week-name { color: var(--gold-bright); }

.cr-week-dates {
  font-size: 9.5px;
  color: #504838;
  line-height: 1.2;
}

/* Mini progress bars in sidebar */
.cr-mini-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 40px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.cr-mini-bar {
  height: 4px;
  background: rgba(12,10,7,0.8);
  border-radius: 2px;
  overflow: hidden;
}
.cr-mini-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}
.cr-mini-bar.hero .cr-mini-bar-fill { background: var(--track-hero); }
.cr-mini-bar.myth .cr-mini-bar-fill { background: var(--track-myth); }

/* Main content */
.cr-main {
  flex: 1;
  padding: 14px 18px;
  overflow-y: auto;
  max-height: 72vh;
  min-width: 0;
}
.cr-main::-webkit-scrollbar { width: 6px; }
.cr-main::-webkit-scrollbar-track { background: rgba(18,16,11,0.5); }
.cr-main::-webkit-scrollbar-thumb { background: var(--gold-deep); border-radius: 3px; }

.cr-week-header {
  margin-bottom: 14px;
}
.cr-week-header h2 {
  font-family: 'MedievalSharp', cursive;
  font-size: 20px;
  color: var(--gold-bright);
  text-shadow: 0 0 10px rgba(255,214,68,0.2);
  margin-bottom: 2px;
}
.cr-week-header .cr-date-range {
  font-size: 12px;
  color: var(--gold-dim);
}

/* Overview cards (stacked progress bars) */
.cr-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.cr-overview-card {
  background: rgba(18,16,11,0.7);
  border: 1px solid var(--gold-deep);
  border-radius: 4px;
  padding: 12px;
}
.cr-overview-card.full-width { grid-column: 1 / -1; }
.cr-overview-card.hero { border-left: 3px solid var(--track-hero); }
.cr-overview-card.myth { border-left: 3px solid var(--track-myth); }
.cr-overview-label {
  font-family: 'MedievalSharp', cursive;
  font-size: 13px;
  margin-bottom: 8px;
}
.cr-overview-card.hero .cr-overview-label { color: var(--track-hero); }
.cr-overview-card.myth .cr-overview-label { color: var(--track-myth); }

.cr-stacked-bar {
  height: 14px;
  background: rgba(12,10,7,0.8);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  margin-bottom: 6px;
}
.cr-stacked-seg {
  height: 100%;
  transition: width 0.3s ease;
}
.cr-stacked-seg.prev { opacity: 0.4; }
.cr-stacked-seg.current { opacity: 1; }
.cr-overview-card.hero .cr-stacked-seg { background: var(--track-hero); }
.cr-overview-card.myth .cr-stacked-seg { background: var(--track-myth); }

.cr-overview-stats {
  font-size: 11px;
  color: #6b5f48;
  display: flex;
  justify-content: space-between;
}
.cr-overview-stats b { color: var(--parchment); font-weight: 600; }
.cr-overview-sources {
  font-size: 10px;
  color: #504838;
  margin-top: 4px;
  font-style: italic;
}

/* Lower crest summary cards */
.cr-lower-crests {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.cr-lower-card {
  background: rgba(18,16,11,0.7);
  border: 1px solid var(--gold-deep);
  border-radius: 4px;
  padding: 10px 12px;
  border-left: 3px solid var(--gold-dark);
  transition: opacity 0.2s;
}
.cr-lower-label {
  font-family: 'MedievalSharp', cursive;
  font-size: 12px;
  color: var(--gold-mid);
  margin-bottom: 4px;
}
.cr-lower-plan {
  font-family: 'Crimson Pro', serif;
  font-size: 12px;
  color: var(--parchment);
  line-height: 1.4;
  margin-bottom: 4px;
}
.cr-lower-sources {
  font-size: 10px;
  color: #504838;
  font-style: italic;
}

/* Lower crest status variants */
.cr-lower-spend { border-left-color: var(--track-adventurer); }
.cr-lower-spend .cr-lower-label { color: var(--track-adventurer); }
.cr-lower-save { border-left-color: var(--gold-mid); }
.cr-lower-save .cr-lower-label { color: var(--gold-bright); }
.cr-lower-convert { border-left-color: var(--track-unranked); opacity: 0.6; }
.cr-lower-convert .cr-lower-label { color: var(--track-unranked); }
.cr-lower-done { border-left-color: var(--gold-deep); opacity: 0.35; }

/* Section titles */
.cr-section-title {
  font-family: 'MedievalSharp', cursive;
  font-size: 14px;
  color: var(--gold-mid);
  margin: 18px 0 8px;
  padding-left: 2px;
}

/* Action cards */
.cr-action-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  background: linear-gradient(90deg, rgba(26,22,16,0.5), rgba(18,16,11,0.3));
  border: 1px solid rgba(92,74,42,0.15);
  border-radius: 3px;
  animation: rowReveal 0.3s ease-out backwards;
}
.cr-action-card.hero { border-left: 3px solid var(--track-hero); }
.cr-action-card.myth { border-left: 3px solid var(--track-myth); }

.cr-action-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  margin-top: 1px;
}
.cr-action-body { flex: 1; min-width: 0; }
.cr-action-title {
  font-family: 'Crimson Pro', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--parchment);
  line-height: 1.3;
}
.cr-action-desc {
  font-size: 11.5px;
  color: #9d9080;
  line-height: 1.4;
  margin-top: 2px;
}
.cr-action-cost {
  font-family: 'Crimson Pro', serif;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(12,10,7,0.6);
  border: 1px solid rgba(92,74,42,0.2);
}
.cr-action-card.hero .cr-action-cost { color: var(--track-hero); }
.cr-action-card.myth .cr-action-cost { color: var(--track-myth); }

/* Conversion tip card */
.cr-conversion-card {
  background: linear-gradient(90deg, rgba(255,128,0,0.08), rgba(18,16,11,0.5));
  border: 1px solid rgba(255,128,0,0.25);
  border-left: 3px solid var(--track-hero);
  border-radius: 4px;
  padding: 12px 14px;
  margin: 10px 0;
}
.cr-conversion-title {
  font-family: 'MedievalSharp', cursive;
  font-size: 13px;
  color: var(--track-hero);
  margin-bottom: 4px;
}
.cr-conversion-text {
  font-size: 12px;
  color: #9d9080;
  line-height: 1.5;
}

/* Notes */
.cr-notes {
  font-size: 12px;
  color: #6b5f48;
  font-style: italic;
  margin: 10px 0;
  padding-left: 8px;
  border-left: 2px solid var(--gold-deep);
  line-height: 1.5;
}

/* Milestone badge */
.cr-milestone {
  display: inline-block;
  font-family: 'Crimson Pro', serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(255,214,68,0.12);
  border: 1px solid var(--gold-dim);
  border-radius: 3px;
  padding: 2px 8px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Advice cards */
.cr-advice-section {
  margin-top: 14px;
}
.cr-advice-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  background: linear-gradient(90deg, rgba(26,22,16,0.5), rgba(18,16,11,0.3));
  border: 1px solid rgba(92,74,42,0.12);
  border-radius: 3px;
  animation: rowReveal 0.3s ease-out backwards;
}
.cr-advice-card.type-action { border-left: 3px solid var(--track-hero); }
.cr-advice-card.type-conversion { border-left: 3px solid #ffaa44; }
.cr-advice-card.type-success { border-left: 3px solid var(--track-adventurer); }
.cr-advice-card.type-warning { border-left: 3px solid var(--track-myth); }
.cr-advice-card.type-info { border-left: 3px solid var(--track-veteran); }

.cr-advice-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  margin-top: 1px;
}
.cr-advice-body { flex: 1; min-width: 0; }
.cr-advice-title {
  font-family: 'Crimson Pro', serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--parchment);
  line-height: 1.3;
}
.cr-advice-desc {
  font-size: 11px;
  color: #9d9080;
  line-height: 1.4;
  margin-top: 2px;
}

.cr-no-gear-msg {
  text-align: center;
  padding: 16px;
  color: #504838;
  font-size: 12px;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   ARMORY IMPORT PANEL
   ═══════════════════════════════════════════════════════════════ */
.bnet-import-panel {
  background: rgba(18,16,11,0.7);
  border: 1px solid var(--gold-deep);
  border-radius: 4px;
  padding: 10px 14px 12px;
  margin-bottom: 14px;
}
.bnet-import-panel .rm-section-title { margin: 0 0 8px; }

.bnet-region-row {
  display: flex;
  justify-content: flex-start;
  gap: 0;
  margin-bottom: 8px;
}
.bnet-region-btn {
  padding: 4px 12px;
  font-size: 10px;
}
.bnet-region-btn:first-child { border-radius: 3px 0 0 3px; }
.bnet-region-btn:last-child { border-radius: 0 3px 3px 0; }
.bnet-region-btn:not(:first-child) { border-left: none; }

.bnet-form-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.bnet-input {
  width: 140px;
  flex: 1;
  text-align: left;
  padding: 4px 8px;
  font-size: 12px;
}
.bnet-fetch-btn {
  width: 32px;
  height: 28px;
  font-size: 14px;
  flex-shrink: 0;
}
.bnet-fetch-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.bnet-status {
  font-family: 'Crimson Pro', serif;
  font-size: 11px;
  color: var(--gold-dark);
  min-height: 16px;
}

/* Ambiguous gear slot inline resolution */
.rm-gear-slot.ambiguous {
  border-color: var(--gold-bright);
  animation: pulseGlow 2s ease-in-out infinite;
}
.bnet-resolve-options {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bnet-resolve-btn {
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 3px;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   GEAR PROGRESS COMPARISON CARD
   ═══════════════════════════════════════════════════════════════ */
.gear-progress-card {
  background: rgba(18,16,11,0.7);
  border: 1px solid var(--gold-deep);
  border-left: 3px solid var(--gold-dim);
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.gear-progress-card .rm-section-title {
  margin: 0 0 8px;
}
.gear-progress-stat {
  font-family: 'Crimson Pro', serif;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
  padding-left: 2px;
}
.gear-progress-row {
  font-size: 11.5px;
  color: #9d9080;
  line-height: 1.7;
  padding-left: 4px;
}
.gear-progress-slot {
  font-weight: 600;
  color: var(--parchment);
  display: inline-block;
  min-width: 70px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .roadmap-layout { flex-direction: column; }
  .rm-sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--gold-deep);
    max-height: none;
    display: flex;
    overflow-x: auto;
    padding: 8px;
    gap: 2px;
    flex-wrap: nowrap;
  }
  .rm-sidebar-title { display: none; }
  .rm-week-entry {
    flex-direction: column;
    padding: 6px 10px;
    min-width: 90px;
    text-align: center;
    gap: 4px;
  }
  .rm-week-entry::before { display: none; }
  .rm-week-dates { display: none; }
  .rm-main { max-height: none; }
  .rm-crest-grid { grid-template-columns: 1fr; }
  .rm-gear-grid { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 16px 10px 14px; }
  /* Crest Roadmap responsive */
  .cr-layout { flex-direction: column; }
  .cr-sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--gold-deep);
    max-height: none;
    display: flex;
    overflow-x: auto;
    padding: 8px;
    gap: 2px;
    flex-wrap: nowrap;
  }
  .cr-sidebar-title { display: none; }
  .cr-week-entry {
    flex-direction: column;
    padding: 6px 10px;
    min-width: 90px;
    text-align: center;
    gap: 4px;
  }
  .cr-week-entry::before { display: none; }
  .cr-week-dates { display: none; }
  .cr-main { max-height: none; }
  .cr-overview-grid { grid-template-columns: 1fr; }
  .cr-lower-crests { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .rm-gear-grid { grid-template-columns: 1fr 1fr; }
  .bnet-form-row { flex-wrap: wrap; }
  .top-tabs { flex-wrap: wrap; }
  .sub-tabs { flex-wrap: wrap; }
}
