.smb-root {
  position: relative;
  --smb-text: #f7fbff;
  --smb-track: rgba(8, 12, 28, 0.56);
  --smb-c1: #7a1d46;
  --smb-c2: #a84b24;
  --smb-c3: #90701f;
  --smb-c4: #1d7a63;
  --smb-c5: #176b8f;
  --smb-popup-bg: rgba(10, 16, 34, 0.96);
  --smb-popup-indicator-bg: rgba(10, 16, 34, 0.96);
  --smb-popup-indicator-size: 16px;
  --smb-popup-indicator-offset-x: 0px;
  --smb-popup-indicator-inset: 0px;
  --smb-popup-text: #f7fbff;
  --smb-popup-z: 30;
}

.smb-skeleton {
  height: 94px;
  border-radius: 24px;
  background: linear-gradient(90deg, rgba(255, 95, 122, 0.16), rgba(51, 217, 255, 0.3), rgba(255, 184, 77, 0.16));
  background-size: 200% 100%;
  animation: smbLoading 1.2s linear infinite;
}

@keyframes smbLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.smb-card {
  --smb-radius: 24px;
  --smb-bar-height: 62px;
  --smb-note-gap: 12px;
  --smb-note-btn-bg: rgba(255, 255, 255, 0.14);
  --smb-note-btn-bg-active: rgba(255, 255, 255, 0.24);
  --smb-note-icon: #f7fbff;
  --smb-note-icon-active: #ffffff;
  --smb-note-size: 34px;
  --smb-note-icon-size: 16px;
  --smb-note-radius: 12px;
  --smb-progress: 0%;
  color: var(--smb-text);
  background:
    radial-gradient(120% 180% at 0% 0%, rgba(255, 95, 122, 0.14), transparent 35%),
    radial-gradient(140% 180% at 100% 100%, rgba(51, 217, 255, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-radius: var(--smb-radius);
  padding: 10px;
  backdrop-filter: blur(12px);
  position: relative;
}

.smb-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--smb-note-gap);
  min-width: 0;
}

.smb-bar-shell {
  position: relative;
  min-width: 0;
}

.smb-track {
  position: relative;
  height: var(--smb-bar-height);
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: var(--smb-track);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.18),
    0 10px 26px rgba(10, 20, 44, 0.16);
}

.smb-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--smb-progress);
  height: 100%;
  border-radius: 999px;
  transition: width .7s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
  overflow: hidden;
}

.smb-fill::after {
  content: '';
  position: absolute;
  top: 10%;
  right: -10px;
  width: 20px;
  height: 80%;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  filter: blur(10px);
  opacity: 0.72;
}

.smb-fill-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,0.12) 38%, rgba(255,255,255,0.28) 52%, transparent 72%);
  transform: translateX(-120%);
  opacity: 0.78;
}

.smb-card.is-peak .smb-fill-glow {
  animation: smbShimmer 2.3s linear infinite;
}

@keyframes smbShimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(140%); }
}

.smb-bar-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  pointer-events: none;
}

.smb-range-note,
.smb-score {
  color: var(--smb-text);
  min-width: 0;
}

.smb-range-note {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}

.smb-score {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}

.smb-note-trigger {
  width: var(--smb-note-size);
  height: var(--smb-note-size);
  flex: 0 0 var(--smb-note-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--smb-note-radius);
  background: var(--smb-note-btn-bg);
  color: var(--smb-note-icon);
  cursor: pointer;
  box-shadow:
    0 10px 22px rgba(8, 12, 28, 0.18),
    inset 0 0 0 1px rgba(255,255,255,0.18);
  transition: transform .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.smb-note-trigger:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(8, 12, 28, 0.2),
    inset 0 0 0 1px rgba(255,255,255,0.22);
}

.smb-note-trigger.is-open,
.smb-note-trigger[aria-expanded="true"] {
  background: var(--smb-note-btn-bg-active);
  color: var(--smb-note-icon-active);
}

.smb-note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}

.smb-note-icon i {
  font-size: var(--smb-note-icon-size);
}

.smb-note-icon svg {
  width: var(--smb-note-icon-size);
  height: var(--smb-note-icon-size);
  fill: currentColor;
}

.smb-note-fallback {
  font-size: var(--smb-note-icon-size);
  font-weight: 700;
}

.smb-detail {
  position: absolute;
  width: min(340px, calc(100vw - 28px));
  display: none;
  z-index: var(--smb-popup-z);
}

.smb-detail::before {
  content: '';
  position: absolute;
  top: calc((var(--smb-popup-indicator-size) / -2) + var(--smb-popup-indicator-inset));
  left: calc(var(--smb-popup-arrow-left, 50%) - (var(--smb-popup-indicator-size) / 2) + var(--smb-popup-indicator-offset-x));
  width: var(--smb-popup-indicator-size);
  height: var(--smb-popup-indicator-size);
  background: var(--smb-popup-indicator-bg);
  border-left: 1px solid rgba(255,255,255,0.12);
  border-top: 1px solid rgba(255,255,255,0.12);
  transform: rotate(45deg);
}

.smb-detail[hidden] {
  display: none !important;
}

.smb-detail-inner {
  position: relative;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--smb-popup-bg);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 42px rgba(5, 10, 24, 0.28);
  color: var(--smb-popup-text);
  line-height: 1.55;
}

.smb-detail-note {
  font-size: 0.94rem;
}

.smb-detail-context {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
  opacity: 0.8;
}

@media (max-width: 767px) {
  .smb-card {
    --smb-note-gap: 10px;
  }

  .smb-bar-content {
    padding: 0 14px;
  }

  .smb-range-note {
    font-size: 0.9rem;
  }

  .smb-score {
    font-size: 1.04rem;
  }

  .smb-detail {
    width: min(300px, calc(100vw - 24px));
  }
}
