/* ==========================================================================
   THE DIVISION 2 DARKZONE BUILDER - APPLICATION STYLES
   ========================================================================== */

/* Top Navigation App Bar */
/* Top Navigation App Bar - Caelestia Floating Glass Dock */
.darkzone-header {
  position: sticky;
  top: 12px;
  z-index: 500;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 16px;
}

body.page-revealed .darkzone-header {
  animation: caelestiaFadeDown 0.85s var(--motion-smooth) both;
}

.darkzone-navbar {
  background-color: rgba(22, 26, 34, 0.78);
  backdrop-filter: blur(24px);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--md-elevation-2);
  border-radius: var(--md-shape-full);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  transition: all var(--motion-duration-short) var(--motion-spring);
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: transform var(--motion-duration-short) var(--motion-spring);
}

.brand-identity:hover {
  transform: scale(1.02);
}

.brand-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--md-shape-full);
  background: #151720;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(255, 119, 0, 0.35);
  border: 1.5px solid rgba(255, 119, 0, 0.45);
  overflow: hidden;
  padding: 1px;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.brand-text h1 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  line-height: 1.1;
  text-transform: uppercase;
}

.brand-text h1 span {
  color: var(--md-sys-color-primary);
  text-shadow: 0 0 16px rgba(245, 184, 212, 0.35);
}

.brand-subtitle {
  font-size: 0.7rem;
  color: var(--md-sys-color-on-surface-variant);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Main Container Layout */
.builder-layout {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1200px) {
  .builder-layout {
    grid-template-columns: 1fr;
  }
}

/* Build Info & Controls Banner - Caelestia Rounded 28px Floating Panel */
.build-meta-card {
  background: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--md-elevation-1);
  border-radius: var(--md-shape-xl);
  backdrop-filter: blur(24px);
  padding: 20px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  transition: all var(--motion-duration-short) var(--motion-spring);
}

body.page-revealed .build-meta-card {
  animation: caelestiaFadeUp 0.9s var(--motion-spring) 0.15s both;
}

.build-meta-card:hover {
  border-color: rgba(245, 184, 212, 0.3);
  box-shadow: var(--md-elevation-2);
}

.build-title-field {
  flex: 1;
  min-width: 260px;
}

.build-title-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-full);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  padding: 8px 20px;
  width: 100%;
  outline: none;
  box-shadow: var(--caelestia-inner-highlight);
  backdrop-filter: blur(12px);
  transition: all var(--motion-duration-short) var(--motion-spring);
}

.build-title-input:focus {
  border-color: var(--md-sys-color-primary);
  background: rgba(245, 184, 212, 0.08);
  box-shadow: 0 0 0 3px rgba(245, 184, 212, 0.2), var(--caelestia-inner-highlight);
}

.build-role-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Section Dividers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.page-revealed .section-header {
  animation: caelestiaFadeUp 0.85s var(--motion-smooth) 0.18s both;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title .section-icon {
  color: var(--md-sys-color-primary);
}

/* Slot Grid */
.slots-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

/* Tactical Slot Card - Caelestia Shell rounded-[28px] Floating Surface */
.slot-card {
  background-color: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-xl);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--md-elevation-1);
  backdrop-filter: blur(20px);
  transition: all var(--motion-duration-short) var(--motion-spring);
  position: relative;
  overflow: hidden;
}

.slot-card:hover {
  border-color: rgba(245, 184, 212, 0.4);
  box-shadow: var(--md-elevation-2), 0 0 20px rgba(245, 184, 212, 0.12);
  transform: translateY(-3px) scale(1.01);
}

.slot-card.rarity-exotic {
  border-color: var(--rarity-exotic-border);
  background: linear-gradient(180deg, rgba(255, 138, 122, 0.1) 0%, var(--md-sys-color-surface-container) 100%);
}

.slot-card.rarity-named {
  border-color: var(--rarity-named-border);
  background: linear-gradient(180deg, rgba(252, 211, 77, 0.08) 0%, var(--md-sys-color-surface-container) 100%);
}

.slot-card.rarity-gearset {
  border-color: var(--rarity-gearset-border);
  background: linear-gradient(180deg, rgba(103, 232, 249, 0.08) 0%, var(--md-sys-color-surface-container) 100%);
}

.slot-card.rarity-prototype {
  border-color: var(--rarity-prototype-border);
  background: linear-gradient(180deg, rgba(196, 181, 253, 0.1) 0%, var(--md-sys-color-surface-container) 100%);
}

/* Caelestia Staggered Slot Construction Cascade (Armi, Gear, AbilitÃ ) */
body.page-revealed #armaPrimariaCard   { animation: caelestiaCardBuild 1.05s var(--motion-spring) 0.20s both; }
body.page-revealed #armaSecondariaCard { animation: caelestiaCardBuild 1.05s var(--motion-spring) 0.30s both; }
body.page-revealed #armaPistolaCard    { animation: caelestiaCardBuild 1.05s var(--motion-spring) 0.40s both; }

body.page-revealed #slotMascheraCard    { animation: caelestiaCardBuild 1.1s var(--motion-spring) 0.35s both; }
body.page-revealed #slotBustoCard       { animation: caelestiaCardBuild 1.1s var(--motion-spring) 0.46s both; }
body.page-revealed #slotFondinaCard     { animation: caelestiaCardBuild 1.1s var(--motion-spring) 0.57s both; }
body.page-revealed #slotZainoCard       { animation: caelestiaCardBuild 1.1s var(--motion-spring) 0.68s both; }
body.page-revealed #slotGuantiCard      { animation: caelestiaCardBuild 1.1s var(--motion-spring) 0.79s both; }
body.page-revealed #slotGinocchiereCard { animation: caelestiaCardBuild 1.1s var(--motion-spring) 0.90s both; }

body.page-revealed #skillSlot1Card { animation: caelestiaCardBuild 1.05s var(--motion-spring) 0.98s both; }
body.page-revealed #skillSlot2Card { animation: caelestiaCardBuild 1.05s var(--motion-spring) 1.08s both; }


/* Card Header */
.slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.slot-type-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slot-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--md-shape-full);
  background-color: var(--md-sys-color-surface-container-highest);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-primary);
  box-shadow: var(--caelestia-inner-highlight);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.slot-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Slot Body */
.slot-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.item-main-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.item-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.25;
}

.item-subtitle {
  font-size: 0.775rem;
  color: var(--md-sys-color-on-surface-variant);
}

/* Attributes display - soft organic container */
.slot-attributes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  background-color: rgba(17, 20, 27, 0.7);
  padding: 12px 16px;
  border-radius: var(--md-shape-md);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--caelestia-inner-highlight);
}

.attr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.775rem;
  gap: 8px;
}

.attr-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.attr-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dot-red { background-color: var(--shd-core-red); box-shadow: 0 0 8px rgba(255, 133, 150, 0.8); }
.dot-blue { background-color: var(--shd-core-blue); box-shadow: 0 0 8px rgba(114, 208, 244, 0.8); }
.dot-yellow { background-color: var(--shd-core-yellow); box-shadow: 0 0 8px rgba(248, 223, 120, 0.8); }

.attr-label {
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
}

.attr-value {
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Talent display - soft capsule pill */
.slot-talent-box {
  background: rgba(245, 184, 212, 0.08);
  border: 1px solid rgba(245, 184, 212, 0.25);
  border-radius: var(--md-shape-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: var(--caelestia-inner-highlight);
}

.talent-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
}

.talent-desc {
  font-size: 0.725rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.35;
}

/* Slot Actions */
.slot-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   SIDEBAR - STATS PREVIEW & EXOTIC TRACKER (Caelestia Shell)
   ========================================================================== */
.stats-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 6px;
}

.stats-sidebar > * {
  flex-shrink: 0;
}

body.page-revealed .stats-sidebar > * {
  animation: caelestiaSidebarSlide 1.05s var(--motion-spring) both;
}

body.page-revealed .stats-sidebar > *:nth-child(1) { animation-delay: 0.28s; }
body.page-revealed .stats-sidebar > *:nth-child(2) { animation-delay: 0.40s; }
body.page-revealed .stats-sidebar > *:nth-child(3) { animation-delay: 0.52s; }
body.page-revealed .stats-sidebar > *:nth-child(4) { animation-delay: 0.64s; }
body.page-revealed .stats-sidebar > *:nth-child(5) { animation-delay: 0.76s; }
body.page-revealed .stats-sidebar > *:nth-child(6) { animation-delay: 0.88s; }

/* Soppressione visiva durante il caricamento del loader SHD iniziale */
html.shd-is-loading .darkzone-header,
html.shd-is-loading .build-meta-card,
html.shd-is-loading .section-header,
html.shd-is-loading .slot-card,
html.shd-is-loading .stats-sidebar > * {
  opacity: 0 !important;
  pointer-events: none !important;
}


.stats-sidebar::-webkit-scrollbar {
  width: 6px;
}

.stats-sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--md-shape-full);
}

.stats-sidebar::-webkit-scrollbar-thumb {
  background: rgba(245, 184, 212, 0.3);
  border-radius: var(--md-shape-full);
}

.stats-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 184, 212, 0.6);
}

/* Exotic Limit Tracker - Caelestia Shell rounded-[28px] */
.exotic-tracker-card {
  background: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--md-elevation-1);
  border-radius: var(--md-shape-xl);
  backdrop-filter: blur(20px);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exotic-tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exotic-counter-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: var(--md-shape-full);
}

.exotic-safe {
  background: rgba(42, 157, 143, 0.2);
  border: 1px solid var(--shd-core-blue);
  color: #6CE5D8;
}

.exotic-limit {
  background: rgba(255, 94, 54, 0.25);
  border: 1px solid var(--rarity-exotic);
  color: #FFA07A;
}

.exotic-warning {
  background: rgba(255, 84, 73, 0.3);
  border: 1px solid var(--md-sys-color-error);
  color: #FF8590;
}

.exotic-status-text {
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.35;
}

/* Core Attributes Tally - Caelestia Soft Pill Blocks */
.core-tally-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.core-tally-box {
  border-radius: var(--md-shape-md);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  box-shadow: var(--caelestia-inner-highlight);
  backdrop-filter: blur(10px);
  transition: transform var(--motion-duration-short) var(--motion-spring);
}

.core-tally-box:hover {
  transform: translateY(-2px) scale(1.02);
}

.core-box-red {
  background: var(--shd-core-red-bg);
  border: 1px solid var(--shd-core-red-border);
}

.core-box-blue {
  background: var(--shd-core-blue-bg);
  border: 1px solid var(--shd-core-blue-border);
}

.core-box-yellow {
  background: var(--shd-core-yellow-bg);
  border: 1px solid var(--shd-core-yellow-border);
}

.core-num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.core-box-red .core-num { color: #ff8596; }
.core-box-blue .core-num { color: #72d0f4; }
.core-box-yellow .core-num { color: #f8df78; }

.core-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--md-sys-color-on-surface);
}

/* Combat Stats Card - Caelestia Shell rounded-[28px] */
.combat-stats-card {
  background-color: var(--md-sys-color-surface-container);
  border-radius: var(--md-shape-xl);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--md-elevation-1);
  backdrop-filter: blur(20px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-row-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.stat-title {
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
}

.stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #FFFFFF;
}

/* Progress bar for CHC - Organic Pill Track */
.stat-progress-bg {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.06);
  border-radius: var(--md-shape-full);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.stat-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f5b8d4 0%, #f3a4c8 100%);
  border-radius: var(--md-shape-full);
  box-shadow: 0 0 12px rgba(245, 184, 212, 0.5);
  transition: width 0.4s var(--motion-spring);
}

.stat-progress-fill.overcap {
  background: linear-gradient(90deg, #ff8596 0%, #ff5449 100%);
  box-shadow: 0 0 12px rgba(255, 84, 73, 0.6);
}

/* Set Bonuses List - Caelestia Shell rounded-[28px] */
.active-sets-card {
  background-color: var(--md-sys-color-surface-container);
  border-radius: var(--md-shape-xl);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--md-elevation-1);
  backdrop-filter: blur(20px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.set-bonus-item {
  background: rgba(17, 20, 27, 0.7);
  border-radius: var(--md-shape-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-left: 3px solid var(--md-sys-color-primary);
  box-shadow: var(--caelestia-inner-highlight);
}

.set-bonus-item.is-gearset {
  border-left-color: var(--rarity-gearset);
}

.set-bonus-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.set-bonus-tier {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--md-sys-color-primary);
  font-weight: 700;
}

.set-bonus-desc {
  font-size: 0.72rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.3;
}

/* Discord Export Preview Card */
.discord-preview-card {
  background-color: #2B2D31;
  border-radius: var(--md-shape-md);
  border: 1px solid #1E1F22;
  padding: 16px;
  font-family: 'Consolas', monospace;
  font-size: 0.75rem;
  color: #DBDEE1;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.4;
  user-select: text;
}

/* Item Selector Dialog Styling */
.selector-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 6px;
}

.selector-item-card {
  background-color: var(--md-sys-color-surface-container-high);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--caelestia-inner-highlight);
  backdrop-filter: blur(14px);
  transition: all var(--motion-duration-short) var(--motion-spring);
}

.selector-item-card:hover {
  border-color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-surface-container-highest);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 16px rgba(245, 184, 212, 0.2), var(--caelestia-inner-highlight);
}

.selector-item-card:active {
  transform: scale(0.97);
}

.selector-item-card.is-selected {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-primary-container);
  box-shadow: 0 0 16px rgba(245, 184, 212, 0.3), var(--caelestia-inner-highlight);
}

.selector-item-card.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.selector-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #FFFFFF;
}

.selector-item-meta {
  font-size: 0.72rem;
  color: var(--md-sys-color-on-surface-variant);
}

.selector-item-desc {
  font-size: 0.7rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.35;
  margin-top: 4px;
}

/* Preset Builds Drawer / Modal */
.presets-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.preset-card {
  background-color: var(--md-sys-color-surface-container-high);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-lg);
  padding: 18px;
  cursor: pointer;
  box-shadow: var(--caelestia-inner-highlight);
  backdrop-filter: blur(14px);
  transition: all var(--motion-duration-short) var(--motion-spring);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-card:hover {
  border-color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-surface-container-highest);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(245, 184, 212, 0.2), var(--caelestia-inner-highlight);
}

.preset-card:active {
  transform: scale(0.97);
}

/* Footer info */
.darkzone-footer {
  margin-top: 60px;
  padding: 36px 24px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  background-color: rgba(11, 13, 19, 0.85);
  backdrop-filter: blur(20px);
  text-align: center;
  font-size: 0.8rem;
  color: var(--md-sys-color-on-surface-variant);
}

.darkzone-footer a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--motion-duration-short) ease;
}

.darkzone-footer a:hover {
  color: #fcd8e8;
  text-decoration: underline;
}

.darkzone-footer .author-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  background: rgba(245, 184, 212, 0.08);
  border: 1px solid rgba(245, 184, 212, 0.25);
  border-radius: var(--md-shape-full);
  color: var(--md-sys-color-primary);
  font-weight: 700;
  box-shadow: var(--caelestia-inner-highlight);
  transition: all var(--motion-duration-short) var(--motion-spring);
  text-decoration: none;
}

.darkzone-footer .author-link:hover {
  background: rgba(245, 184, 212, 0.2);
  border-color: var(--md-sys-color-primary);
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(245, 184, 212, 0.35), var(--caelestia-inner-highlight);
  transform: translateY(-1px) scale(1.04);
  text-decoration: none;
}

/* ==========================================================================
   PROTOTYPE SLOTS & AUGMENTS STYLING
   ========================================================================== */
.slot-card.is-prototype {
  border-color: var(--rarity-prototype-border) !important;
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.12) 0%, var(--md-sys-color-surface-container) 100%) !important;
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.22);
}

.prototype-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #7C3AED 0%, #C084FC 100%);
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: var(--md-shape-xs);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.4);
}

.slot-augment-box {
  background: rgba(192, 132, 252, 0.08);
  border-left: 3px solid var(--rarity-prototype);
  border-radius: 0 var(--md-shape-sm) var(--md-shape-sm) 0;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.augment-desc {
  font-size: 0.72rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.35;
}

.selector-item-card.is-blocked {
  opacity: 0.45;
  border-color: rgba(255, 84, 73, 0.5) !important;
  background-color: rgba(255, 84, 73, 0.05) !important;
  cursor: not-allowed;
  position: relative;
}

.blocked-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #FFA49D;
  background: rgba(255, 84, 73, 0.2);
  border: 1px solid var(--md-sys-color-error);
  padding: 2px 6px;
  border-radius: var(--md-shape-xs);
}

/* ==========================================================================
   EXPERTISE / QUALIFICA (MAESTRIA 0-30) STYLING
   ========================================================================== */
.expertise-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 179, 0, 0.06);
  border: 1px solid rgba(255, 179, 0, 0.2);
  border-radius: var(--md-shape-xs);
  padding: 4px 8px;
  margin-top: 6px;
}

.expertise-row.proto-locked {
  background: rgba(192, 132, 252, 0.08);
  border-color: rgba(192, 132, 252, 0.3);
}

.expertise-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #FFB300;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.expertise-row.proto-locked .expertise-label {
  color: var(--rarity-prototype);
}

.expertise-select {
  background-color: var(--md-sys-color-surface-container-high);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--md-shape-xs);
  padding: 2px 22px 2px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  height: 26px;
  min-width: 130px;
}

.expertise-locked-badge {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.4) 0%, rgba(192, 132, 252, 0.4) 100%);
  border: 1px solid var(--rarity-prototype);
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: var(--md-shape-xs);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   SHD WATCH WIDGET CARD (SIDEBAR MINI-HUD)
   ========================================================================== */
.shd-watch-widget-card {
  flex-shrink: 0;
  min-height: fit-content;
  background: linear-gradient(180deg, #1C1510 0%, #131316 100%);
  border: 1px solid rgba(255, 119, 0, 0.3);
  border-radius: var(--md-shape-lg);
  padding: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(255, 119, 0, 0.08);
}

.shd-watch-widget-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #FF7700 0%, #FFB300 50%, #FF7700 100%);
}

.shd-watch-widget-card:hover {
  border-color: #FF7700;
  box-shadow: 0 6px 26px rgba(255, 119, 0, 0.22);
  transform: translateY(-2px);
}

.shd-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.shd-mini-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #FF7700;
}

.shd-mini-dial-container {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.shd-dial-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #FF7700;
  background: radial-gradient(circle, #2C180B 0%, #140E0A 70%, #0D0A08 100%);
  box-shadow: 0 0 16px rgba(255, 119, 0, 0.4), inset 0 0 10px rgba(255, 119, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.shd-dial-circle::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 179, 0, 0.4);
}

.shd-dial-icon {
  font-size: 18px;
  color: #FF7700;
}

.shd-dial-lvl {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 900;
  color: #FFFFFF;
}

.shd-mini-stats-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shd-mini-level-label {
  font-size: 0.68rem;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shd-mini-health-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #6CE5D8;
}

.shd-mini-quadrants-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.shd-mini-chip {
  padding: 6px 12px;
  border-radius: var(--md-shape-full);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--caelestia-inner-highlight);
}

.shd-mini-chip.offensive { border-color: rgba(255, 133, 150, 0.35); color: #ff8596; }
.shd-mini-chip.defensive { border-color: rgba(114, 208, 244, 0.35); color: #72d0f4; }
.shd-mini-chip.utility { border-color: rgba(248, 223, 120, 0.35); color: #f8df78; }
.shd-mini-chip.handling { border-color: rgba(196, 181, 253, 0.35); color: #c4b5fd; }

.shd-widget-expand-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--md-sys-color-primary-container);
  border: 1px solid rgba(245, 184, 212, 0.3);
  color: var(--md-sys-color-primary);
  border-radius: var(--md-shape-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: var(--caelestia-inner-highlight);
  transition: all var(--motion-duration-short) var(--motion-spring);
  cursor: pointer;
}

.shd-widget-expand-btn:hover {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(245, 184, 212, 0.35);
}

.shd-widget-expand-btn:active {
  transform: scale(0.97);
}

/* ==========================================================================
   SHD WATCH FULL HUD MODAL (Caelestia Shell 28px rounded dialog & deep blur)
   ========================================================================== */
.shd-watch-modal-backdrop {
  background: rgba(10, 13, 18, 0.85);
  backdrop-filter: blur(20px);
}

.shd-watch-modal-dialog {
  background: rgba(22, 26, 34, 0.92);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--md-elevation-5), 0 0 36px rgba(245, 184, 212, 0.12);
  border-radius: var(--md-shape-xl);
  backdrop-filter: blur(32px);
  width: 95vw;
  max-width: 1320px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.94) translateY(24px);
  transition: transform var(--motion-duration-medium) var(--motion-spring);
}

.shd-watch-modal-backdrop.active .shd-watch-modal-dialog {
  transform: scale(1) translateY(0);
}

.shd-watch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: rgba(17, 20, 27, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 12px;
}

.shd-watch-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shd-phoenix-header-icon {
  font-size: 32px;
  color: var(--md-sys-color-primary);
  text-shadow: 0 0 16px rgba(245, 184, 212, 0.5);
}

.shd-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #FFFFFF;
  margin: 0;
  text-transform: uppercase;
}

.shd-subtitle {
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant);
  letter-spacing: 0.04em;
}

.shd-watch-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* HUD Inner Content Container */
.shd-hud-container {
  padding: 22px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: calc(92vh - 80px);
}

/* Mobile Category Tabs (hidden on desktop) */
.shd-mobile-category-tabs {
  display: none;
}

/* Control bar for levels and presets */
.shd-level-control-bar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--md-shape-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.shd-level-input-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.shd-level-input {
  background: #14151B;
  border: 1.5px solid #FF7700;
  color: #FFB300;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--md-shape-xs);
  width: 120px;
  text-align: center;
  box-shadow: 0 0 10px rgba(255, 119, 0, 0.2);
  transition: all 0.2s ease;
}

.shd-level-input:focus {
  outline: none;
  border-color: #FFA000;
  box-shadow: 0 0 16px rgba(255, 119, 0, 0.45);
}

.shd-level-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 4-Quadrant HUD Layout with Grid Areas (Desktop Default: 3 Columns) */
.shd-tactical-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 280px 1fr;
  grid-template-areas:
    "offensive dial defensive"
    "utility   dial handling";
  gap: 20px 24px;
  align-items: center;
}

.cat-offensive { grid-area: offensive; }
.cat-defensive { grid-area: defensive; }
.shd-center-dial-wrapper { grid-area: dial; }
.cat-utility { grid-area: utility; }
.cat-handling { grid-area: handling; }

/* Central Circular HUD */
.shd-center-dial-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding: 8px;
}

.shd-center-dial {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 3px solid rgba(245, 184, 212, 0.4);
  background: radial-gradient(circle, #231922 0%, #17131b 50%, #0d0e14 100%);
  box-shadow: 0 0 36px rgba(245, 184, 212, 0.25), inset 0 0 30px rgba(245, 184, 212, 0.2), var(--caelestia-inner-highlight);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 16px;
  transition: all var(--motion-duration-medium) var(--motion-spring);
  animation: shdDialPulse 6.5s ease-in-out infinite alternate;
}

@keyframes shdDialPulse {
  0% {
    box-shadow: 0 0 28px rgba(245, 184, 212, 0.2), inset 0 0 20px rgba(245, 184, 212, 0.15);
    border-color: rgba(245, 184, 212, 0.35);
  }
  100% {
    box-shadow: 0 0 46px rgba(245, 184, 212, 0.4), inset 0 0 32px rgba(245, 184, 212, 0.3);
    border-color: rgba(245, 184, 212, 0.65);
  }
}

/* Cerchio tratteggiato interno ANIMATO con rotazione fluida antioraria */
.shd-center-dial::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px dashed rgba(245, 184, 212, 0.55);
  pointer-events: none;
  animation: shdRotateCounter 36s linear infinite;
  box-shadow: inset 0 0 10px rgba(245, 184, 212, 0.15);
}

/* Mezzo cerchio / archi esterni ANIMATI con rotazione continua oraria fluida */
.shd-center-dial::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border-top: 3.5px solid #f5b8d4;
  border-right: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  border-left: 3.5px solid #f3a4c8;
  filter: drop-shadow(0 0 10px rgba(245, 184, 212, 0.8));
  pointer-events: none;
  animation: shdRotateClockwise 16s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes shdRotateClockwise {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes shdRotateCounter {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

.shd-eagle-badge {
  font-size: 34px;
  color: var(--md-sys-color-primary);
  margin-bottom: 2px;
  text-shadow: 0 0 16px rgba(245, 184, 212, 0.8);
  animation: eagleHover 4.5s ease-in-out infinite alternate;
}

@keyframes eagleHover {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-2px) scale(1.05); }
}

.shd-dial-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #D9D9D9;
  text-transform: uppercase;
}

.shd-dial-level-number {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.1;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.5), 0 0 30px rgba(245, 184, 212, 0.4);
}

.shd-dial-separator {
  width: 140px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--md-sys-color-primary), transparent);
  margin: 6px 0;
  box-shadow: 0 0 8px rgba(245, 184, 212, 0.6);
}

.shd-dial-health-sub {
  font-size: 0.65rem;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shd-dial-health-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #72d0f4;
  margin-top: 2px;
}

.shd-scavenging-center-box {
  margin-top: 14px;
  background: rgba(255, 119, 0, 0.08);
  border: 1px solid #FF7700;
  border-radius: var(--md-shape-sm);
  padding: 8px 14px;
  text-align: center;
  min-width: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 15px rgba(255, 119, 0, 0.15);
}

.shd-scavenging-center-box .scav-num {
  font-family: var(--font-mono);
  font-weight: 900;
  color: #FFB300;
  font-size: 1.1rem;
}

/* Category Quadrant Box - Caelestia Shell rounded-[28px] Floating Cards */
.shd-category-quadrant {
  width: 100%;
  background: rgba(22, 26, 34, 0.85);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-xl);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--md-elevation-2);
  position: relative;
  backdrop-filter: blur(20px);
  transition: all var(--motion-duration-short) var(--motion-spring);
}

.shd-category-quadrant:hover {
  transform: translateY(-2px);
  box-shadow: var(--md-elevation-3);
}

.shd-category-quadrant.cat-offensive {
  border-top: 2px solid rgba(255, 133, 150, 0.6);
  box-shadow: var(--md-elevation-1), 0 0 20px rgba(255, 133, 150, 0.08);
}

.shd-category-quadrant.cat-defensive {
  border-top: 2px solid rgba(114, 208, 244, 0.6);
  box-shadow: var(--md-elevation-1), 0 0 20px rgba(114, 208, 244, 0.08);
}

.shd-category-quadrant.cat-utility {
  border-top: 2px solid rgba(248, 223, 120, 0.6);
  box-shadow: var(--md-elevation-1), 0 0 20px rgba(248, 223, 120, 0.08);
}

.shd-category-quadrant.cat-handling {
  border-top: 2px solid rgba(134, 239, 172, 0.6);
  box-shadow: var(--md-elevation-1), 0 0 20px rgba(134, 239, 172, 0.08);
}

.shd-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
}

.shd-cat-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shd-cat-name {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.shd-cat-points-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--md-shape-full);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--caelestia-inner-highlight);
}

.cat-offensive .shd-cat-points-badge { color: #ff8596; border: 1px solid rgba(255, 133, 150, 0.4); }
.cat-defensive .shd-cat-points-badge { color: #72d0f4; border: 1px solid rgba(114, 208, 244, 0.4); }
.cat-utility .shd-cat-points-badge { color: #f8df78; border: 1px solid rgba(248, 223, 120, 0.4); }
.cat-handling .shd-cat-points-badge { color: #86efac; border: 1px solid rgba(134, 239, 172, 0.4); }

/* 2x2 Nodes Grid */
.shd-nodes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.shd-node-card {
  background: rgba(17, 20, 27, 0.7);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--caelestia-inner-highlight);
  transition: all var(--motion-duration-short) var(--motion-spring);
}

.shd-node-card:hover {
  background: rgba(28, 33, 44, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.01);
}

.shd-node-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.shd-node-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.25;
  word-break: normal;
  overflow: visible;
}

.shd-node-points {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
}

.shd-node-bonus {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
}

.cat-offensive .shd-node-bonus { color: #FF8590; }
.cat-defensive .shd-node-bonus { color: #6CE5D8; }
.cat-utility .shd-node-bonus { color: #FFE082; }
.cat-handling .shd-node-bonus { color: #81C784; }

/* ==========================================================================
   ANDROID / MATERIAL YOU (M3 EXPRESSIVE) FLUID SLIDER & PROGRESS
   ========================================================================== */

/* Barra di avanzamento superiore stile Android (shimmer wave animation) */
.shd-node-meter {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--md-shape-full);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.shd-node-meter-fill {
  height: 100%;
  border-radius: var(--md-shape-full);
  position: relative;
  transition: width 0.35s var(--motion-spring);
  overflow: hidden;
}

/* Animazione Shimmer Android 16/17 fluida continua */
.shd-node-meter-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  animation: androidShimmer 3.2s infinite ease-in-out;
}

@keyframes androidShimmer {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

.cat-offensive .shd-node-meter-fill {
  background: linear-gradient(90deg, #ff8596 0%, #ff5722 100%);
  box-shadow: 0 0 10px rgba(255, 87, 34, 0.6);
}

.cat-defensive .shd-node-meter-fill {
  background: linear-gradient(90deg, #72d0f4 0%, #00bcd4 100%);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.6);
}

.cat-utility .shd-node-meter-fill {
  background: linear-gradient(90deg, #f8df78 0%, #ffc107 100%);
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
}

.cat-handling .shd-node-meter-fill {
  background: linear-gradient(90deg, #86efac 0%, #00e676 100%);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.6);
}

/* CONTROLS (Stepper Buttons + Fluid Slider) */
.shd-node-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  touch-action: none;
}

/* Range input styled cleanly without rectangular native background */
.shd-node-slider {
  -webkit-appearance: none !important;
  appearance: none !important;
  flex: 1;
  width: 100%;
  height: 28px;
  background: transparent !important;
  background-color: transparent !important;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  touch-action: none;
}

.shd-node-slider:focus {
  outline: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

/* Webkit Track: Soft pill groove */
.shd-node-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  border-radius: var(--md-shape-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: all var(--motion-duration-short) ease;
}

/* Firefox Track */
.shd-node-slider::-moz-range-track {
  width: 100%;
  height: 8px;
  border-radius: var(--md-shape-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: all var(--motion-duration-short) ease;
}

/* Webkit Thumb - Android M3 Floating Circular Handle */
.shd-node-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 22px;
  height: 22px;
  border-radius: var(--md-shape-full);
  margin-top: -7px; /* Centrato su track di 8px: (8 - 22)/2 = -7px */
  border: 2.5px solid #FFFFFF;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform var(--motion-duration-short) var(--motion-spring), box-shadow var(--motion-duration-short) ease;
}

.shd-node-slider:hover::-webkit-slider-thumb {
  transform: scale(1.15);
}

.shd-node-slider:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.28);
}

/* Firefox Thumb */
.shd-node-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: var(--md-shape-full);
  border: 2.5px solid #FFFFFF;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform var(--motion-duration-short) var(--motion-spring), box-shadow var(--motion-duration-short) ease;
}

.shd-node-slider:hover::-moz-range-thumb {
  transform: scale(1.15);
}

.shd-node-slider:active::-moz-range-thumb {
  cursor: grabbing;
  transform: scale(1.28);
}

/* Colori specifici del thumb per categoria con soft glow neon */
.cat-offensive-slider::-webkit-slider-thumb {
  background: #ff8596;
  box-shadow: 0 0 14px rgba(255, 133, 150, 0.9), 0 2px 6px rgba(0, 0, 0, 0.4);
}
.cat-offensive-slider::-moz-range-thumb {
  background: #ff8596;
  box-shadow: 0 0 14px rgba(255, 133, 150, 0.9), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.cat-defensive-slider::-webkit-slider-thumb {
  background: #72d0f4;
  box-shadow: 0 0 14px rgba(114, 208, 244, 0.9), 0 2px 6px rgba(0, 0, 0, 0.4);
}
.cat-defensive-slider::-moz-range-thumb {
  background: #72d0f4;
  box-shadow: 0 0 14px rgba(114, 208, 244, 0.9), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.cat-utility-slider::-webkit-slider-thumb {
  background: #f8df78;
  box-shadow: 0 0 14px rgba(248, 223, 120, 0.9), 0 2px 6px rgba(0, 0, 0, 0.4);
}
.cat-utility-slider::-moz-range-thumb {
  background: #f8df78;
  box-shadow: 0 0 14px rgba(248, 223, 120, 0.9), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.cat-handling-slider::-webkit-slider-thumb {
  background: #86efac;
  box-shadow: 0 0 14px rgba(134, 239, 172, 0.9), 0 2px 6px rgba(0, 0, 0, 0.4);
}
.cat-handling-slider::-moz-range-thumb {
  background: #86efac;
  box-shadow: 0 0 14px rgba(134, 239, 172, 0.9), 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Scavenging Material Breakdown Section */
.shd-scavenging-section {
  background: rgba(18, 19, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--md-shape-md);
  padding: 14px 18px;
}

.shd-scavenging-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.shd-scav-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--md-shape-xs);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shd-scav-name {
  font-size: 0.72rem;
  color: var(--md-sys-color-on-surface-variant);
}

.shd-scav-yield {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: #FFB300;
}

/* RESPONSIVE LAYOUT BREAKPOINTS FOR SHD WATCH MODAL */

/* Laptop & Tablet (< 1200px or compact height): 2x2 Grid with Dial on Top */
@media (max-width: 1199px) {
  .shd-tactical-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "dial dial"
      "offensive defensive"
      "utility handling";
    gap: 16px;
  }

  .shd-center-dial-wrapper {
    flex-direction: row;
    gap: 20px;
    margin-bottom: 4px;
  }

  .shd-center-dial {
    width: 190px;
    height: 190px;
    padding: 10px;
  }

  .shd-center-dial .shd-eagle-badge {
    font-size: 24px;
  }

  .shd-center-dial .shd-dial-title {
    font-size: 0.65rem;
  }

  .shd-center-dial .shd-dial-level-number {
    font-size: 2rem;
  }

  .shd-center-dial .shd-dial-health-sub {
    font-size: 0.58rem;
  }

  .shd-center-dial .shd-dial-health-val {
    font-size: 0.85rem;
  }

  .shd-scavenging-center-box {
    margin-top: 0;
  }
}

/* Mobile Screens (< 720px): Clean Tabbed Categories & Compact Tactical Summary Strip */
@media (max-width: 720px) {
  .shd-watch-modal-dialog {
    width: 95vw !important;
    max-width: 95vw !important;
    height: 92vh !important;
    max-height: 92vh !important;
    margin: auto !important;
    position: relative !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .shd-watch-header {
    padding: 12px 14px 10px !important;
    position: relative !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .shd-watch-title-group {
    padding-right: 36px !important; /* Leave room for close button */
    gap: 8px !important;
  }

  .shd-phoenix-header-icon {
    font-size: 26px !important;
  }

  .shd-title {
    font-size: 0.9rem !important;
    letter-spacing: 0.03em !important;
  }

  .shd-subtitle {
    font-size: 0.65rem !important;
  }

  .shd-watch-header-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .shd-watch-header-actions > button:nth-child(1),
  .shd-watch-header-actions > button:nth-child(2) {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    padding: 6px 4px !important;
  }

  .shd-watch-close-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 10 !important;
    width: 32px !important;
    height: 32px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .shd-hud-container {
    padding: 12px 12px 20px !important;
    gap: 12px !important;
    flex: 1 !important;
    overflow-y: auto !important;
    max-height: none !important;
  }

  .shd-level-control-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }

  .shd-level-input-box {
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .shd-level-input {
    width: 90px !important;
    font-size: 1rem !important;
    padding: 4px 8px !important;
  }

  .shd-level-presets {
    justify-content: space-between !important;
    gap: 4px !important;
    width: 100% !important;
  }

  .shd-level-presets .md3-btn {
    flex: 1 !important;
    padding: 4px 2px !important;
    font-size: 0.68rem !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* Compact Dial Strip on Mobile */
  .shd-center-dial-wrapper {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 8px 12px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--md-shape-md) !important;
    box-sizing: border-box !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  .shd-center-dial {
    width: auto !important;
    height: auto !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    animation: none !important;
    padding: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    text-align: left !important;
  }

  .shd-center-dial::before,
  .shd-center-dial::after,
  .shd-dial-separator,
  .shd-dial-title,
  .shd-dial-health-sub {
    display: none !important;
  }

  .shd-eagle-badge {
    font-size: 24px !important;
    margin: 0 !important;
    animation: none !important;
  }

  .shd-dial-level-number {
    font-size: 1.35rem !important;
    line-height: 1 !important;
  }

  .shd-dial-health-val {
    font-size: 0.78rem !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  .shd-scavenging-center-box {
    margin-top: 0 !important;
    padding: 5px 10px !important;
    background: rgba(255, 119, 0, 0.1) !important;
    border-radius: var(--md-shape-sm) !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .shd-scavenging-center-box .scav-num {
    font-size: 1.05rem !important;
  }

  /* Mobile Category Tabs */
  .shd-mobile-category-tabs {
    display: flex !important;
    gap: 5px !important;
    background: rgba(14, 16, 22, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--md-shape-md) !important;
    padding: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .shd-mob-tab {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 2px !important;
    border-radius: var(--md-shape-sm) !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--md-sys-color-on-surface-variant) !important;
    cursor: pointer !important;
    gap: 2px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .shd-mob-tab .mob-tab-dot {
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
  }

  .cat-tab-offensive .mob-tab-dot { background: #ff8596 !important; }
  .cat-tab-defensive .mob-tab-dot { background: #72d0f4 !important; }
  .cat-tab-utility .mob-tab-dot { background: #f8df78 !important; }
  .cat-tab-handling .mob-tab-dot { background: #86efac !important; }

  .shd-mob-tab.is-active.cat-tab-offensive {
    background: rgba(255, 133, 150, 0.16) !important;
    border-color: rgba(255, 133, 150, 0.5) !important;
    color: #ff8596 !important;
  }
  .shd-mob-tab.is-active.cat-tab-defensive {
    background: rgba(114, 208, 244, 0.16) !important;
    border-color: rgba(114, 208, 244, 0.5) !important;
    color: #72d0f4 !important;
  }
  .shd-mob-tab.is-active.cat-tab-utility {
    background: rgba(248, 223, 120, 0.16) !important;
    border-color: rgba(248, 223, 120, 0.5) !important;
    color: #f8df78 !important;
  }
  .shd-mob-tab.is-active.cat-tab-handling {
    background: rgba(134, 239, 172, 0.16) !important;
    border-color: rgba(134, 239, 172, 0.5) !important;
    color: #86efac !important;
  }

  .shd-mob-tab .mob-tab-pts {
    font-family: var(--font-mono) !important;
    font-size: 0.65rem !important;
    opacity: 0.85 !important;
  }

  /* Tactical Stage & Category Quadrants on Mobile */
  .shd-tactical-stage {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  /* Only display the currently selected tab's category on mobile! */
  .shd-category-quadrant:not(.mob-active) {
    display: none !important;
  }

  .shd-category-quadrant.mob-active {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    padding: 14px !important;
    border-radius: var(--md-shape-md) !important;
    box-sizing: border-box !important;
  }

  .shd-nodes-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .shd-node-card {
    padding: 10px 12px !important;
    gap: 6px !important;
  }

  .shd-node-controls {
    gap: 8px !important;
  }

  .shd-step-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 18px !important;
  }

  .shd-node-slider {
    height: 30px !important;
  }
}

/* Gear Mod Slots & Custom Recalibration Controls */
.gear-mod-slot-row {
  transition: background-color 0.2s ease;
}

.gear-mod-slot-row:hover {
  background: rgba(255, 119, 0, 0.05);
  border-radius: var(--md-shape-xs);
}

.gear-mod-badge {
  background: rgba(255, 119, 0, 0.12);
  border: 1px solid rgba(255, 119, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

#weaponArchetypeList .selector-item-card.is-selected {
  border-color: #FF7700;
  background: rgba(255, 119, 0, 0.12);
  box-shadow: 0 0 0 1px #FF7700;
}

/* ==========================================================================
   SHD DIVISION LOADER - DARKZONE ITALIA
   ========================================================================== */
.shd-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0f1013;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: 'Consolas', 'Courier New', monospace, sans-serif;
  overflow: hidden;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.65s ease;
}

.shd-loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none !important;
}

/* Griglia HUD di sfondo tipica di The Division */
.shd-loader-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(rgba(255, 106, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 106, 0, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.shd-interface {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 24px;
}

/* Header Titolo Community */
.shd-community-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.shd-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 5px;
  color: #72757c;
  text-transform: uppercase;
}

.shd-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 4.5px;
  color: #e5e7eb;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shd-title span {
  color: #ff6a00;
  text-shadow: 0 0 8px rgba(255, 106, 0, 0.7);
}

/* Badge Loader */
.shd-loader {
  position: relative;
  width: 155px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #2a2b2f 0%, #1a1b1e 75%, #121315 100%);
  box-shadow: 
    0 0 0 6px #0f1013,
    0 0 0 9px rgba(255, 106, 0, 0.25),
    0 0 35px rgba(227, 82, 5, 0.28),
    inset 0 0 25px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Anello arancione SHD statico */
.shd-loader .ring-base {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 4px solid rgba(227, 82, 5, 0.2);
}

/* Anello rotante radar SHD */
.shd-loader::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: #ff6a00;
  border-right-color: #e35205;
  filter: drop-shadow(0 0 10px #ff6a00);
  animation: shd-spin 1.8s cubic-bezier(0.53, 0.21, 0.29, 0.95) infinite;
}

/* Cerchio interno tratteggiato HUD */
.shd-loader::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px dashed rgba(227, 82, 5, 0.35);
  animation: shd-spin-reverse 9s linear infinite;
}

/* Immagine Falco / Aquila Tricolore */
.shd-eagle-img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25));
  animation: eagle-pulse 2s ease-in-out infinite alternate;
  user-select: none;
  pointer-events: none;
}

/* HUD Box Informazioni e Terminale */
.shd-terminal-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 320px;
}

/* Testo primario animato a rotazione */
.shd-console-text {
  color: #ff6a00;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 106, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 6px;
}

.shd-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #ff6a00;
  box-shadow: 0 0 8px #ff6a00;
  animation: cursor-blink 0.8s steps(1) infinite;
}

/* Progress bar segmentata stile SHD */
.shd-progress-wrap {
  width: 200px;
  height: 4px;
  background: rgba(255, 106, 0, 0.15);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.shd-progress-bar {
  width: 100%;
  height: 100%;
  background: #ff6a00;
  box-shadow: 0 0 8px #ff6a00;
  animation: shd-progress-anim 2.5s ease-in-out infinite;
  transform-origin: left;
}

/* Log secondario ISAC */
.shd-sub-logs {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 270px;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #555861;
  text-transform: uppercase;
}

.shd-sub-logs span:last-child {
  color: rgba(255, 106, 0, 0.8);
}

/* Keyframes */
@keyframes shd-spin {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(230deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes shd-spin-reverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes eagle-pulse {
  0% {
    transform: scale(0.96);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.03);
    opacity: 1;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.45));
  }
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes shd-progress-anim {
  0% {
    transform: scaleX(0.08) translateX(-10%);
  }
  50% {
    transform: scaleX(0.7) translateX(30%);
  }
  100% {
    transform: scaleX(0.1) translateX(950%);
  }
}

/* ==========================================================================
   SHD LOADER - MOBILE RESPONSIVE OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 600px) {
  .shd-interface {
    padding: 16px 12px;
    gap: 16px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .shd-community-header {
    text-align: center;
    gap: 3px;
  }

  .shd-tag {
    font-size: 8.5px;
    letter-spacing: 2px;
  }

  .shd-title {
    font-size: clamp(12px, 3.8vw, 15px);
    letter-spacing: clamp(1px, 0.6vw, 2.5px);
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
  }

  .shd-loader {
    width: 130px;
  }

  .shd-terminal-panel {
    min-width: 0;
    width: 100%;
    max-width: 320px;
    gap: 8px;
    padding: 0 8px;
    box-sizing: border-box;
  }

  .shd-console-text {
    font-size: clamp(10px, 3vw, 11.5px);
    letter-spacing: clamp(1px, 0.4vw, 1.8px);
    text-align: center;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
    line-height: 1.35;
  }

  .shd-cursor {
    width: 6px;
    height: 12px;
    flex-shrink: 0;
  }

  .shd-progress-wrap {
    width: min(200px, 70vw);
  }

  .shd-sub-logs {
    max-width: min(240px, 80vw);
    font-size: 8.5px;
    letter-spacing: 1px;
  }
}


/* ==========================================================================
   CAELESTIA SHELL - CUSTOM COMBOBOX & FLOATING DROPDOWN POPOVER
   ========================================================================== */
.caelestia-dropdown-popover {
  position: fixed;
  z-index: 99990;
  background: rgba(20, 24, 33, 0.96);
  border: 1px solid rgba(245, 184, 212, 0.4);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.8), 0 0 28px rgba(245, 184, 212, 0.2), var(--caelestia-inner-highlight);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  max-height: 290px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: caelestiaPopoverIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
  transform-origin: top center;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 184, 212, 0.4) transparent;
}

@keyframes caelestiaPopoverIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.caelestia-dropdown-popover::-webkit-scrollbar {
  width: 6px;
}
.caelestia-dropdown-popover::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--md-shape-full);
}
.caelestia-dropdown-popover::-webkit-scrollbar-thumb {
  background: rgba(245, 184, 212, 0.45);
  border-radius: var(--md-shape-full);
}
.caelestia-dropdown-popover::-webkit-scrollbar-thumb:hover {
  background: var(--md-sys-color-primary);
}

.caelestia-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: 12px;
  color: var(--md-sys-color-on-surface);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--motion-duration-short) var(--motion-spring);
  user-select: none;
  border: 1px solid transparent;
}

.caelestia-dropdown-item:hover {
  background: rgba(245, 184, 212, 0.14);
  color: #FFFFFF;
  border-color: rgba(245, 184, 212, 0.3);
  transform: translateX(3px) scale(1.01);
}

.caelestia-dropdown-item.is-selected {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-primary);
  font-weight: 700;
  border-color: rgba(245, 184, 212, 0.45);
  box-shadow: 0 0 14px rgba(245, 184, 212, 0.2), var(--caelestia-inner-highlight);
}

.caelestia-dropdown-item .item-check {
  font-size: 16px;
  color: var(--md-sys-color-primary);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.caelestia-dropdown-item.is-selected .item-check {
  opacity: 1;
}

/* ==========================================================================
   THE STANLEY PARABLE NARRATOR DIALOGUE TOAST
   ========================================================================== */
.stanley-narrator-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  max-width: 440px;
  width: calc(100vw - 48px);
  background: rgba(18, 22, 30, 0.96);
  border: 1.5px solid rgba(245, 184, 212, 0.5);
  border-radius: 22px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 34px rgba(245, 184, 212, 0.25), var(--caelestia-inner-highlight);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  padding: 16px 20px;
  z-index: 100000;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  animation: stanleySlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: auto;
}

@keyframes stanleySlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.stanley-narrator-toast.stanley-shake {
  animation: stanleyShake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes stanleyShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.stanley-narrator-toast.fade-out {
  opacity: 0;
  transform: translateY(-16px) scale(0.96);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.stanley-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--md-shape-full);
  background: var(--md-sys-color-primary-container);
  border: 1px solid rgba(245, 184, 212, 0.4);
  color: var(--md-sys-color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(245, 184, 212, 0.3), var(--caelestia-inner-highlight);
}

.stanley-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.stanley-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stanley-author {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--md-sys-color-primary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stanley-click-counter {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #ff8596;
  background: rgba(255, 133, 150, 0.15);
  border: 1px solid rgba(255, 133, 150, 0.3);
  padding: 2px 8px;
  border-radius: var(--md-shape-full);
}

.stanley-text {
  font-family: var(--font-body);
  font-size: 0.86rem;
  line-height: 1.45;
  color: #FFFFFF;
  font-style: italic;
}

/* ==========================================================================
   ISAC DEVTOOLS SECURITY LOCKOUT SCREEN
   ========================================================================== */
#isacSecurityLockout {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgba(10, 12, 16, 0.98);
  backdrop-filter: blur(36px);
  -webkit-backdrop-filter: blur(36px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  animation: lockoutFadeIn 0.3s ease both;
}

@keyframes lockoutFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lockout-card {
  max-width: 520px;
  width: 100%;
  background: rgba(22, 26, 35, 0.96);
  border: 1.5px solid #ff5722;
  border-radius: 28px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.85), 0 0 44px rgba(255, 87, 34, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lockout-icon-pulse {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 87, 34, 0.16);
  border: 2px solid #ff5722;
  color: #ff5722;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 28px rgba(255, 87, 34, 0.6);
  animation: lockoutPulse 1.5s infinite alternate;
}

@keyframes lockoutPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 18px rgba(255, 87, 34, 0.4); }
  100% { transform: scale(1.06); box-shadow: 0 0 38px rgba(255, 87, 34, 0.8); }
}

.lockout-tag {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #ff5722;
  text-transform: uppercase;
}

.lockout-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lockout-desc {
  font-size: 0.84rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.5;
}

.lockout-narrator-quote {
  font-style: italic;
  color: var(--md-sys-color-primary);
  background: rgba(245, 184, 212, 0.08);
  border-left: 3px solid var(--md-sys-color-primary);
  padding: 10px 14px;
  border-radius: 0 12px 12px 0;
  font-size: 0.82rem;
  text-align: left;
  width: 100%;
}


/* ==========================================================================
   MOBILE LAYOUT & PERFORMANCE OVERHAUL  â€” â‰¤ 600px
   Completely redesigned navigation, layout and animations for smartphones.
   Performance: backdrop-filter, heavy box-shadows and entrance animations
   are disabled to prevent flickering on Samsung Browser / WebView GPU.
   ========================================================================== */

/* â”€â”€ OVERFLOW PREVENTION: stops Samsung Browser from zooming out the page â”€â”€ */
@media (max-width: 600px) {
  html {
    overflow-x: hidden;
    width: 100%;
  }

  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  body {
    width: 100%;
    overflow-x: hidden;
    /* Bottom padding for fixed bottom nav bar */
    padding-bottom: 64px;
  }

  /* Nuclear option: kill all min-width on direct children that can overflow */
  .darkzone-header,
  .builder-layout,
  .slots-container,
  .build-meta-card,
  .slot-card,
  .section-header,
  .stats-sidebar,
  .darkzone-footer {
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* â”€â”€ 0. Global mobile performance fixes â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  /* Kill all backdrop-filter on mobile â€” primary cause of flickering */
  .darkzone-navbar,
  .slot-card,
  .build-meta-card,
  .stats-sidebar > *,
  .exotic-tracker-card,
  .combat-stats-card,
  .active-sets-card,
  .selector-item-card,
  .preset-card,
  .shd-watch-widget-card,
  .core-tally-box,
  .slot-attributes-list,
  .slot-talent-box,
  .md3-card,
  .shd-node-card,
  .md3-modal-backdrop,
  .md3-modal-dialog {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .md3-modal-backdrop {
    background-color: rgba(10, 13, 18, 0.95) !important;
  }

  .md3-modal-dialog {
    background-color: rgba(22, 26, 34, 0.98) !important;
  }

  /* Kill continuous heavy dial spinning animations on mobile */
  .shd-center-dial,
  .shd-center-dial::before,
  .shd-center-dial::after,
  .shd-eagle-badge {
    animation: none !important;
  }

  /* Mobile quick header button for Database Admin */
  .mobile-db-header-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(245, 184, 212, 0.12);
    border: 1px solid rgba(245, 184, 212, 0.3);
    color: var(--md-sys-color-primary);
    text-decoration: none;
    flex-shrink: 0;
    margin-left: auto;
    box-sizing: border-box;
  }

  .mobile-db-header-btn:active {
    background: rgba(245, 184, 212, 0.25);
    transform: scale(0.94);
  }

  /* Kill entrance animations on slot cards â€” cause major jank on mobile */
  body.page-revealed #armaPrimariaCard,
  body.page-revealed #armaSecondariaCard,
  body.page-revealed #armaPistolaCard,
  body.page-revealed #slotMascheraCard,
  body.page-revealed #slotBustoCard,
  body.page-revealed #slotFondinaCard,
  body.page-revealed #slotZainoCard,
  body.page-revealed #slotGuantiCard,
  body.page-revealed #slotGinocchiereCard,
  body.page-revealed #skillSlot1Card,
  body.page-revealed #skillSlot2Card,
  body.page-revealed .stats-sidebar > *,
  body.page-revealed .build-meta-card,
  body.page-revealed .section-header,
  body.page-revealed .darkzone-header {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Disable shimmer on progress bars â€” GPU-intensive */
  .shd-node-meter-fill::after {
    animation: none !important;
    display: none !important;
  }

  /* Remove hover transforms that trigger repaints on touch */
  .slot-card:hover,
  .selector-item-card:hover,
  .preset-card:hover,
  .core-tally-box:hover,
  .shd-watch-widget-card:hover,
  .shd-node-card:hover,
  .brand-identity:hover,
  .shd-widget-expand-btn:hover {
    transform: none !important;
    box-shadow: var(--md-elevation-1) !important;
  }

  /* Simplify box-shadows across the board */
  .slot-card,
  .build-meta-card,
  .exotic-tracker-card,
  .combat-stats-card,
  .active-sets-card {
    box-shadow: 0 1px 4px rgba(0,0,0,0.4) !important;
  }

  /* â”€â”€ 1. Desktop pill navbar â†’ flat top bar on mobile â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .darkzone-header {
    position: sticky;
    top: 0;
    z-index: 500;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .darkzone-navbar {
    border-radius: 0 !important;
    padding: 0 14px !important;
    height: 56px !important;
    min-height: 56px !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background-color: rgba(17, 20, 28, 0.97) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
  }

  /* Hide all action buttons in top navbar on mobile */
  .darkzone-navbar .header-actions {
    display: none !important;
  }

  /* Compact brand identity in the top bar */
  .brand-identity {
    gap: 10px;
    flex: 1;
    min-width: 0;
    max-width: 100%;
  }

  .brand-logo-badge {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .brand-text {
    min-width: 0;
    overflow: hidden;
  }

  .brand-text h1 {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
  }

  .brand-subtitle {
    display: none;
  }

  /* â”€â”€ 2. Mobile Bottom Navigation Bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 600;
    height: 64px;
    background: rgba(17, 20, 28, 0.97);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -2px 16px rgba(0,0,0,0.55);
    align-items: center;
    justify-content: space-around;
    padding: 0 4px env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
    width: 100%;
  }

  .mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    transition: color 0.18s ease;
    padding: 6px 2px 4px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
  }

  .mob-nav-item:active {
    color: var(--md-sys-color-primary);
  }

  .mob-nav-icon {
    font-size: 22px;
    line-height: 1;
  }

  .mob-nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
  }

  /* â”€â”€ 3. Mobile Bottom Sheet (secondary actions) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .mobile-menu-sheet {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 700;
    background: rgba(0, 0, 0, 0.6);
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .mobile-menu-sheet.active {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-sheet-panel {
    width: 100%;
    background: var(--md-sys-color-surface-container-high);
    border-radius: 24px 24px 0 0;
    padding: 12px 16px 32px;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
  }

  .mobile-menu-sheet.active .mobile-sheet-panel {
    transform: translateY(0);
  }

  .mobile-sheet-handle {
    width: 36px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 0 auto 12px;
  }

  .mobile-sheet-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    padding-left: 4px;
  }

  .mobile-sheet-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .mobile-sheet-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
  }

  .mobile-sheet-btn:active {
    background: rgba(255,255,255,0.1);
  }

  .mobile-sheet-btn-danger {
    color: var(--md-sys-color-error);
    border-color: rgba(255, 84, 73, 0.3);
    background: rgba(255, 84, 73, 0.06);
  }

  /* â”€â”€ 4. Main layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .builder-layout {
    padding: 12px 10px !important;
    gap: 16px !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Slots container */
  .slots-container {
    gap: 18px;
    width: 100%;
    min-width: 0;
  }

  /* Single column for all slot grids */
  .slots-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  /* â”€â”€ 5. Build meta card (nome build + selettori) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .build-meta-card {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 16px !important;
    gap: 14px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .build-title-field {
    min-width: 0 !important;
    width: 100% !important;
  }

  .build-title-input {
    font-size: 1.1rem;
    padding: 10px 14px;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .build-role-selector {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .build-role-selector .md3-field {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Override all inline min-width on selects */
  .md3-select {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* â”€â”€ 6. Section headers â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .section-header {
    flex-wrap: wrap;
    gap: 6px;
  }

  .section-title {
    font-size: 0.9rem;
  }

  /* â”€â”€ 7. Slot cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .slot-card {
    padding: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .item-name {
    font-size: 0.95rem;
  }

  /* Attribute rows: keep on one line, allow text-overflow */
  .attr-row {
    font-size: 0.72rem;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 6px;
  }

  .attr-indicator {
    flex-shrink: 0;
  }

  .attr-value {
    font-size: 0.72rem;
    text-align: right;
    word-break: break-word;
    flex-shrink: 1;
  }

  /* Talent description wrap */
  .talent-desc {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }

  /* â”€â”€ 8. Stats sidebar â†’ flat on mobile (no sticky) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .stats-sidebar {
    position: static !important;
    max-height: none !important;
    overflow-y: visible !important;
    padding-right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Core tally: make it 3-col on mobile */
  .core-tally-container {
    gap: 8px;
  }

  .core-tally-box {
    padding: 10px 6px;
    min-width: 0;
  }

  .core-num {
    font-size: 1.3rem;
  }

  /* â”€â”€ 9. SHD Watch widget compact â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .shd-watch-widget-card {
    box-shadow: 0 1px 4px rgba(0,0,0,0.4) !important;
  }

  /* â”€â”€ 10. Modals: full-width on mobile â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .md3-modal-dialog {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 88vh;
    margin: auto;
    box-sizing: border-box;
  }

  .selector-grid {
    grid-template-columns: 1fr !important;
    max-height: 50vh;
  }

  /* â”€â”€ 11. Stanley narrator toast â€” above bottom nav â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .stanley-narrator-toast {
    bottom: 78px !important;
    right: 12px !important;
    left: auto !important;
    max-width: min(320px, 88vw);
  }

  /* â”€â”€ 12. Footer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .darkzone-footer {
    padding: 24px 16px;
    font-size: 0.75rem;
  }

}

/* Desktop: hide mobile-only elements */
@media (min-width: 601px) {
  .mobile-bottom-nav {
    display: none !important;
  }
  .mobile-menu-sheet {
    display: none !important;
  }
  .mobile-db-header-btn {
    display: none !important;
  }
}
