/* ===== TechBros Rankings (single-file) ===== */
.tb-rankings {
  --blue-900: #1E3A8A;
  --blue-700: #2F57C8;
  --blue-500: #4573E3;
  --blue-300: #6B90EB;
  --blue-100: #DBEAFE;

  --red-900: #7F1D1D;
  --red-700: #C82F2F;
  --red-500: #EF4444;
  --red-300: #EB6B6B;
  --red-100: #FEE2E2;

  --orange-900: #A84A00;
  --orange-700: #C86500;
  --orange-500: #F38C2A;
  --orange-300: #F29B4B;
  --orange-100: #F8C27A;

  --green-900: #1C8A43;
  --green-700: #2FA357;
  --green-500: #45C16B;
  --green-300: #6BD58A;
  --green-100: #DCFCE7;

  --yellow-900: #A88E1C;
  --yellow-700: #C8AA2F;
  --yellow-500: #E3C545;
  --yellow-300: #EBD76B;
  --yellow-100: #FEF9C3;

  --black-900: #0F0F0F;
  --black-700: #1E1E1E;
  --black-500: #3A3A3A;
  --black-300: #6A6A6A;
  --black-100: #F3F4F6;

  --primary-color: var(--blue-500);
  --primary-light: rgba(69, 115, 227, 0.08);
  --text-main: var(--black-900);
  --text-sub: var(--black-300);
  --bg-body: #ffffff;
  --bg-card: #F9F9F9;
  --border-color: #e5e7eb;
  --container-width: 1200px;
  --radius: 18px;
  --radius-inner: 10px;
  --side-px: 24px;
  --inner-px: 18px;
  --shadow-card: 0 4px 12px rgba(30, 58, 138, 0.03);
  --shadow-hover: 0 12px 32px rgba(30, 58, 138, 0.08);

  font-family: 'Pretendard Variable', Pretendard, system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.tb-rankings .tb-wrap {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--side-px);
}

.tb-rankings .tb-header {
  background: #fff;
}

.tb-rankings .tb-header-inner {
  padding-top: 5px;
  padding-bottom: 0;
}

.tb-rankings .tb-divider {
  height: 1px;
  background-color: var(--border-color);
  margin-top: 20px;
}

.tb-rankings h1 {
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  padding: 0;
  font-weight: 800;
}

@media (max-width: 768px) {
  .tb-rankings h1 {
    font-size: 28px;
    line-height: 1.1;
    margin-bottom: 16px;
    padding: 0 16px;
  }
}

.tb-rankings .tb-controls-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 24px;
}

.tb-rankings .tb-controls-bar .tb-search-wrap {
  flex: 1;
}

.tb-rankings .tb-filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--black-700);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  flex-shrink: 0;
  box-shadow: none;
}

.tb-rankings .tb-filter-toggle-btn:hover {
  background: #fff;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.tb-rankings .tb-filter-toggle-btn:active {
  transform: scale(0.96);
}

.tb-rankings .tb-filter-toggle-btn.is-open {
  background: var(--primary-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.tb-rankings .tb-filter-toggle-btn .tb-filter-toggle-icon {
  color: inherit;
}

.tb-rankings .tb-collapse-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tb-rankings .tb-collapse-wrap.is-open {
  grid-template-rows: 1fr;
}

.tb-rankings .tb-collapse-inner {
  overflow: hidden;
}

.tb-rankings .tb-subtitle {
  display: block;
  font-size: 15px;
  margin-top: 8px;
  color: var(--black-300);
  font-weight: 600;
}

@media (max-width: 768px) {
  .tb-rankings .tb-subtitle {
    font-size: 14px;
    margin-top: 6px;
  }
}

.tb-rankings .tb-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  padding-bottom: 16px;
}

@media (min-width: 1024px) {
  .tb-rankings .tb-grid {
    grid-template-columns: 2fr 1fr;
    gap: 32px;
  }
}

.tb-rankings .tb-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 640px) {
  .tb-rankings .tb-filters {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .tb-rankings .tb-filters .full {
    grid-column: span 2;
  }
}

.tb-rankings .tb-left-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Form Fields */
.tb-rankings .tb-field {
  margin-bottom: 0;
}

.tb-rankings .tb-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--black-700);
  margin-bottom: 8px;
}

.tb-rankings select,
.tb-rankings input[type="text"],
.tb-rankings input[type="number"] {
  width: 100%;
  height: 46px;
  /* Increased from 40px */
  padding: 0 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-inner);
  font-size: 15px;
  color: var(--black-900);
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  /* Hide native arrow to show custom one */
  transition: border-color .2s;
}

.tb-rankings select {
  padding-right: 48px;
  /* Space for arrow + margin */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 22px center;
  /* Increased right margin from 14px to 22px */
  background-size: 16px;
}

.tb-rankings input:focus,
.tb-rankings select:focus {
  border-color: var(--primary-color);
  outline: none;
}

.tb-rankings .tb-search-inner {
  position: relative;
}

.tb-rankings .tb-search-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  /* Center relative to inner wrapper (input height) */
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--black-300);
  pointer-events: none;
  z-index: 2;
}

.tb-rankings .tb-search-input {
  padding-left: 44px !important;
  /* Space for search icon */
  border-radius: var(--radius);
}

.tb-rankings .tb-panel {
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: none;
}

.tb-rankings .tb-panel .cap {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--black-300);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.tb-rankings .tb-kv {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tb-rankings .tb-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.tb-rankings .rangevals {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tb-rankings .pill-input {
  width: 100px;
  height: 46px;
  /* Match other inputs */
  font-size: 13px;
  font-weight: 600;
  color: var(--black-500);
  border: 1px solid var(--border-color);
  padding: 0 10px;
  border-radius: var(--radius-inner);
  /* Standard radius */
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  text-align: center;
  outline: none;
}

.tb-rankings .pill-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.tb-rankings .tb-row .k {
  color: var(--black-500);
  font-weight: 600;
}

.tb-rankings .tb-row .v {
  font-weight: 600;
  color: var(--black-900);
}

.tb-rankings .tb-row .v.primary {
  color: var(--primary-color);
}

.tb-rankings .tb-hr {
  height: 1px;
  background: var(--border-color);
  margin: 10px 0;
}

.tb-rankings .tb-main {
  padding: 6px 0 90px;
}

.tb-rankings .tb-top3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 32px;
}

/* ===== Dynamic Sort Description Box ===== */
.tb-rankings .tb-sort-desc-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
  padding: 0;
  background: transparent;
  border: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 1;
  transform: translateY(0);
}

.tb-rankings .tb-sort-desc-wrap.is-updating {
  opacity: 0;
  transform: translateY(-4px);
}

.tb-rankings .tb-sort-desc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  margin-top: 2px;
  flex-shrink: 0;
}

.tb-rankings .tb-sort-desc-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--black-500);
  font-weight: 600;
  word-break: keep-all;
  white-space: pre-line;
}

@media (max-width: 768px) {
  .tb-rankings .tb-sort-desc-wrap {
    margin-top: 10px;
    padding: 0;
  }

  .tb-rankings .tb-sort-desc-text {
    font-size: 12px;
    line-height: 1.55;
  }
}

.tb-rankings .card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: var(--inner-px);
  box-shadow: var(--shadow-card);
  transition: transform .2s, box-shadow .2s;
  position: relative;
  display: flex;
  flex-direction: column;
}

.tb-rankings .card:hover {
  /* Animation removed as per user request */
}

.tb-rankings .card.first {
  box-shadow: var(--shadow-card);
  outline: none;
  border-color: rgba(69, 115, 227, 0.22);
}

.tb-rankings .badge {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  background: #f3f4f6;
  color: var(--black-500);
}

.tb-rankings .badge.rank-1 {
  background: rgba(212, 175, 55, 0.12);
  color: #876B10;
  border: 1px solid rgba(212, 175, 55, 0.42);
  box-shadow: none;
}

.tb-rankings .badge.rank-2 {
  background: rgba(169, 169, 169, 0.12);
  color: #667085;
  border: 1px solid rgba(169, 169, 169, 0.42);
  box-shadow: none;
}

.tb-rankings .badge.rank-3 {
  background: rgba(160, 82, 45, 0.11);
  color: #8A4A2C;
  border: 1px solid rgba(160, 82, 45, 0.4);
  box-shadow: none;
}

.tb-rankings .card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.tb-rankings .price {
  font-size: 14px;
  font-weight: 600;
  color: var(--black-500);
  white-space: nowrap;
}

.tb-rankings .title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  line-height: 1.2;
}

.tb-rankings .meta {
  font-size: 14px;
  color: var(--black-300);
  font-weight: 600;
  margin-bottom: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tb-rankings .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tb-rankings .tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--black-500);
  background: #f8fafc;
  border: 1px solid #eef2f7;
  padding: 6px 10px;
  border-radius: 10px;
}

.tb-rankings .card .thumb {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
  z-index: 1;
  box-sizing: border-box;
  transform: none;
}

.tb-rankings .card .thumb.rank-1 {
  border: 2px solid rgba(212, 175, 55, 0.68);
}

.tb-rankings .card .thumb.rank-2 {
  border: 2px solid rgba(169, 169, 169, 0.68);
}

.tb-rankings .card .thumb.rank-3 {
  border: 2px solid rgba(160, 82, 45, 0.62);
}

.tb-rankings .card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  display: block;
  border-radius: inherit;
}

.tb-rankings .card-body-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  position: relative;
  /* Ensure context if needed, though card is better */
  padding-right: 80px;
  /* Make space for the absolute thumb */
}

.tb-rankings .score-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}

.tb-rankings .score-label {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.tb-rankings .bar {
  height: 6px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
}

.tb-rankings .bar>div {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

.tb-rankings .list {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}



.tb-rankings .li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px var(--inner-px);
  border-bottom: 1px solid var(--border-color);
  transition: background .15s;
}

.tb-rankings .li-radar {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.tb-rankings .tb-mini-radar-canvas {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 80px !important;
  height: 80px !important;
}

.tb-rankings .li:last-child {
  border-bottom: none;
}

.tb-rankings .li:hover {
  background: rgba(15, 15, 15, 0.02);
}

.tb-rankings .li-rank {
  width: 56px;
  color: #d1d5db;
  font-weight: 800;
  flex-shrink: 0;
}

.tb-rankings .li-score {
  width: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.tb-rankings .score-container-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 82px;
  gap: 2px;
  transform: translateY(18px);
}

.tb-rankings .score-gauge {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.tb-rankings .score-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.tb-rankings .score-gauge circle {
  fill: none;
  stroke-width: 3.5;
}

.tb-rankings .score-gauge .bg {
  stroke: #f3f4f6;
}

.tb-rankings .score-gauge .val {
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tb-rankings .score-gauge .score-val-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.tb-rankings .score-primary-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--black-700);
  white-space: nowrap;
  text-align: center;
}

.tb-rankings .score-primary-label-short {
  display: none;
}

.tb-rankings .score-primary-label.is-placeholder {
  visibility: hidden;
}

.tb-rankings .score-secondary {
  min-height: 13px;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--black-300);
  white-space: nowrap;
  text-align: center;
}

.tb-rankings .score-secondary.is-placeholder {
  visibility: hidden;
}

/* Score Stroke Classes */
.tb-rankings .tb-stroke-black { stroke: #0f0f0f; }
.tb-rankings .tb-stroke-blue { stroke: #4573E3; }
.tb-rankings .tb-stroke-green { stroke: #45C16B; }
.tb-rankings .tb-stroke-amber { stroke: #F38C2A; }
.tb-rankings .tb-stroke-red { stroke: #EF4444; }

.tb-rankings .li-thumb {
  width: 48px;
  height: 48px;
  background: #f3f4f6;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.tb-rankings .li-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tb-rankings .li-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.tb-rankings .li-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tb-rankings .li-title {
  font-weight: 600;
  color: var(--black-900);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-rankings .li-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tb-rankings .li-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.tb-rankings .li-badge.method-active {
  background: rgba(69, 115, 227, 0.08);
  color: var(--blue-700);
}

.tb-rankings .li-badge.method-passive {
  background: rgba(107, 114, 128, 0.08);
  color: var(--black-500);
}

.tb-rankings .li-badge.form-bookshelf {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
}

.tb-rankings .li-badge.form-floorstanding {
  background: rgba(139, 92, 246, 0.08);
  color: #7c3aed;
}

.tb-rankings .li-badge.form-soundbar {
  background: rgba(236, 72, 153, 0.08);
  color: #db2777;
}

.tb-rankings .li-badge.form-mini-speakers {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
}

.tb-rankings .li-badge.form-other {
  background: rgba(107, 114, 128, 0.08);
  color: var(--black-500);
}

.tb-rankings .li-price {
  width: 120px;
  text-align: right;
  font-weight: 600;
  color: var(--black-500);
}

.tb-rankings .li-price-unit {
  font-size: 0.85em;
  opacity: 0.45;
  margin-right: 4px;
  font-weight: normal;
}

/* Score Bar Gradients (Hardcoded Hex for Reliability) */
.tb-rankings .tb-text-black {
  color: #0F0F0F;
}

.tb-rankings .tb-bar-black {
  background: linear-gradient(to right, #F3F4F6, #0F0F0F);
}

.tb-rankings .tb-text-blue {
  color: #4573E3;
}

.tb-rankings .tb-bar-blue {
  background: linear-gradient(to right, #DBEAFE, #4573E3);
}

.tb-rankings .tb-text-green {
  color: #45C16B;
}

.tb-rankings .tb-bar-green {
  background: linear-gradient(to right, #DCFCE7, #45C16B);
}

.tb-rankings .tb-text-amber {
  color: #F38C2A;
}

.tb-rankings .tb-bar-amber {
  background: linear-gradient(to right, #F8C27A, #F38C2A);
}

.tb-rankings .tb-text-red {
  color: #EF4444;
}

.tb-rankings .tb-bar-red {
  background: linear-gradient(to right, #FEE2E2, #EF4444);
}

.tb-rankings .empty {
  text-align: center;
  padding: 70px 18px;
  background: #fff;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  color: var(--black-500);
  font-weight: 600;
}

/* Price Range Slider */
.tb-rankings .range {
  position: relative;
  height: 34px;
  padding-top: 8px;
  margin-top: 10px;
  margin-left: 20px;
  margin-right: 20px;
}

.tb-rankings .range input[type="range"] {
  position: absolute;
  left: -20px;
  top: -3px;
  width: calc(100% + 40px);
  height: 40px;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  opacity: 0;
  margin: 0;
  padding: 0;
  border: none;
  touch-action: none;
}

/* Default Z-index to stack correctly */
.tb-rankings .range input[data-role="min"] {
  z-index: 3;
}

.tb-rankings .range input[data-role="max"] {
  z-index: 4;
}

/* RE-ENABLE pointer events on the THUMB itself so it can be dragged */
.tb-rankings .range input[type="range"]::-webkit-slider-thumb {
  pointer-events: all;
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: grab;
  position: relative;
  z-index: 10;
}

.tb-rankings .range input[type="range"]::-moz-range-thumb {
  pointer-events: all;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: grab;
  position: relative;
  z-index: 10;
}

.tb-rankings .track {
  position: absolute;
  left: 0;
  right: 0;
  top: 16px;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
}

.tb-rankings .rangefill {
  position: absolute;
  top: 16px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary-color);
}

.tb-rankings .thumb {
  position: absolute;
  top: 10px;
  width: 18px;
  height: 18px;
  background: #fff;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.tb-rankings .rangevals {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tb-rankings .pill {
  font-size: 12px;
  font-weight: 900;
  color: var(--black-500);
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Links */
.tb-rankings a.tb-link {
  color: inherit;
  text-decoration: none;
}

.tb-rankings a.tb-link:hover {
  text-decoration: underline;
}

@media (max-width: 680px) {
  .tb-rankings .tb-main>.tb-wrap {
    padding: 0;
  }

  .tb-rankings .list {
    border-left: none;
    border-right: none;
    border-radius: 0;
    box-shadow: none;
  }

  .tb-rankings .tb-sort-container {
    padding: 0;
  }

  .tb-rankings [data-role="search-results-wrap"] {
    margin-left: 16px;
    margin-right: 16px;
  }

  .tb-rankings .tb-top3 {
    display: none !important;
  }

  .tb-rankings .li {
    display: grid;
    grid-template-columns: 24px 44px 1fr 54px 60px;
    grid-template-areas:
      "rank thumb info score radar"
      "rank thumb price score radar";
    gap: 4px 10px;
    padding: 14px 12px;
    align-items: center;
  }

  .tb-rankings .li-rank {
    width: auto;
    grid-area: rank;
    font-size: 14px;
    text-align: center;
    align-self: center;
  }

  .tb-rankings .li-radar {
    display: flex !important;
    grid-area: radar;
    width: 60px;
    height: 60px;
    align-self: center;
    justify-self: center;
  }

  .tb-rankings .tb-mini-radar-canvas {
    width: 60px !important;
    height: 60px !important;
  }

  .tb-rankings .li-thumb {
    width: 44px;
    height: 44px;
    margin-right: 0;
    grid-area: thumb;
    align-self: center;
  }

  .tb-rankings .li-info {
    flex: unset;
    grid-area: info;
    min-width: 0;
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .tb-rankings .li-meta-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
  }

  .tb-rankings .li-title {
    white-space: normal;
    font-size: 13px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 0;
  }

  .tb-rankings .li-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
  }

  .tb-rankings .li-price {
    width: auto;
    grid-area: price;
    text-align: left;
    font-size: 12px;
    color: var(--black-700);
    align-self: center;
  }

  .tb-rankings .li-score {
    width: auto;
    grid-area: score;
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
  }

  .tb-rankings .score-gauge {
    width: 38px;
    height: 38px;
  }

  .tb-rankings .score-gauge .score-val-text {
    font-size: 11px;
  }

  .tb-rankings .score-container-inner {
    min-height: 63px;
    transform: translateY(12px);
  }

  .tb-rankings .score-primary-label-full {
    display: none;
  }

  .tb-rankings .score-primary-label-short {
    display: block;
    max-width: 54px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.15;
    text-overflow: ellipsis;
  }

  .tb-rankings .score-secondary {
    min-height: 12px;
    font-size: 9px;
  }
}

/* ===== Sort Chips Bar (지표별 정렬 칩) ===== */
.tb-rankings .tb-sort-container {
  margin-bottom: 40px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tb-rankings .tb-sort-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 0;
}

.tb-rankings .tb-sort-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--black-700);
}

.tb-rankings .tb-sort-dots {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.tb-rankings .tb-sort-dot {
  display: grid;
  width: 22px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.tb-rankings .tb-sort-dot::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-100);
  content: "";
  transition: background-color 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) {
  .tb-rankings .tb-sort-dot:hover::before {
    background: var(--blue-300);
    transform: scale(1.15);
  }
}

.tb-rankings .tb-sort-dot.is-active::before,
.tb-rankings .tb-sort-dot[aria-pressed="true"]::before {
  background: var(--primary-color);
  transform: scale(1.25);
}

.tb-rankings .tb-sort-chips {
  display: flex;
  gap: 24px;
  background: transparent;
  padding: 0;
  border: none;
  max-width: 100%;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tb-rankings .tb-sort-chips::-webkit-scrollbar {
  display: none;
}

.tb-rankings .tb-sort-chip {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 1px;
  border-radius: 4px;
  border: 0;
  background: transparent;
  color: var(--black-300);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.2s ease;
  outline: none;
  font-family: inherit;
  position: relative;
  appearance: none;
  -webkit-appearance: none;
}

.tb-rankings .tb-sort-chip::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 4px;
  left: 1px;
  height: 2px;
  border-radius: 999px;
  background: var(--blue-700);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
  pointer-events: none;
}

.tb-rankings .tb-sort-chip:hover:not(.is-active) {
  background: transparent;
  color: var(--black-700);
}

.tb-rankings .tb-sort-chip.is-active,
.tb-rankings .tb-sort-chip[aria-pressed="true"] {
  background: transparent;
  color: var(--blue-700);
}

.tb-rankings .tb-sort-chip.is-active::after,
.tb-rankings .tb-sort-chip[aria-pressed="true"]::after {
  transform: scaleX(1);
}

.tb-rankings .tb-sort-chip:active {
  opacity: 0.7;
}

.tb-rankings .tb-filter-toggle-btn:focus-visible,
.tb-rankings .tb-sort-dot:focus-visible,
.tb-rankings .tb-sort-chip:focus-visible,
.tb-rankings a.tb-link:focus-visible {
  outline: 3px solid rgba(69, 115, 227, 0.28);
  outline-offset: 3px;
}



/* Mobile bleeding optimization for Sort Chips */
@media (max-width: 680px) {
  .tb-rankings .tb-wrap {
    padding: 0;
  }

  .tb-rankings .tb-collapse-inner {
    padding: 0 16px;
  }

  .tb-rankings .list {
    border-left: none;
    border-right: none;
    border-radius: 0;
    box-shadow: none;
  }

  .tb-rankings .tb-sort-container {
    padding: 0;
  }

  .tb-rankings .tb-sort-header {
    padding: 0 16px;
  }

  .tb-rankings .tb-sort-chips {
    padding-left: 16px;
    padding-right: 16px;
  }

  .tb-rankings .tb-sort-desc-wrap {
    margin-left: 16px;
    margin-right: 16px;
  }

  .tb-rankings .tb-controls-bar {
    margin-left: 16px;
    margin-right: 16px;
  }
}

/* ===== Poweramp Custom Styles ===== */
.tb-rankings .chan-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.tb-rankings .chan-btn {
  flex: 1;
  min-width: 36px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  color: var(--black-500);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.tb-rankings .chan-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.tb-rankings .chan-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 3px 8px rgba(69, 115, 227, 0.15);
}

/* ===== Guide Section ===== */
.tb-rankings .tb-guide-section {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 44px;
  box-shadow: var(--shadow-card);
}

.tb-rankings .tb-guide-title {
  font-size: 20px;
  font-family: inherit;
  font-weight: 800;
  color: var(--black-900);
  margin: 0;
  padding: 0;
  padding-left: 14px;
  border: none;
  border-left: 5px solid var(--primary-color);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  line-height: 1.3;
  outline: none;
}

.tb-rankings .tb-guide-title,
.tb-rankings .tb-guide-title:focus,
.tb-rankings .tb-guide-title:active,
.tb-rankings .tb-guide-title:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

.tb-rankings .tb-guide-title .tb-guide-chevron {
  transition: transform .3s ease;
  color: var(--black-300);
  margin-right: 4px;
}

.tb-rankings .tb-guide-title.is-open .tb-guide-chevron {
  transform: rotate(180deg);
}

.tb-rankings .tb-guide-hint {
  font-size: 13px;
  font-weight: 700;
  color: var(--black-300);
  margin-left: 12px;
  transition: opacity 0.2s;
}

.tb-rankings .tb-guide-title.is-open .tb-guide-hint {
  opacity: 0;
}

.tb-rankings .tb-guide-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tb-rankings .tb-guide-collapse.is-open {
  grid-template-rows: 1fr;
}

.tb-rankings .tb-guide-inner {
  overflow: hidden;
}

.tb-rankings .tb-guide-content {
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

@media (min-width: 768px) {
  .tb-rankings .tb-guide-content {
    flex-direction: row;
    align-items: stretch;
    gap: 36px;
  }
}

.tb-rankings .tb-guide-chart-wrap {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tb-rankings .tb-guide-desc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  flex: 1;
}

@media (min-width: 640px) {
  .tb-rankings .tb-guide-desc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .tb-rankings .tb-guide-desc-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.tb-rankings .tb-guide-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f8fafc;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #eef2f7;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.tb-rankings .tb-guide-item:hover {
  background: #f1f5f9;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.tb-rankings .tb-guide-item.is-active {
  background: var(--primary-light);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.tb-rankings .tb-guide-item.is-active .g-num {
  background: var(--primary-color);
}

.tb-rankings .tb-guide-item:active {
  transform: scale(0.98);
}

.tb-rankings .g-num {
  width: 22px;
  height: 22px;
  background: var(--black-900);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.tb-rankings .g-text strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--black-900);
  margin-bottom: 6px;
  line-height: 1.2;
}

.tb-rankings .g-text strong .g-en {
  font-size: 11px;
  font-weight: 600;
  color: var(--black-300);
  display: block;
  margin-top: 2px;
}

.tb-rankings .g-text p {
  font-size: 13px;
  color: var(--black-500);
  margin: 0;
  line-height: 1.4;
  word-break: keep-all;
}

/* ===== Poweramp Badge Colors ===== */
.tb-rankings .li-badge.use-상업용 {
  background: rgba(59, 130, 246, 0.08);
  color: var(--blue-700);
}
.tb-rankings .li-badge.use-하이파이 {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
}
.tb-rankings .li-badge.use-스튜디오 {
  background: rgba(139, 92, 246, 0.08);
  color: #7c3aed;
}
.tb-rankings .li-badge.use-포터블 {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
}
.tb-rankings .li-badge.class-classa {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
}
.tb-rankings .li-badge.class-classb {
  background: rgba(107, 114, 128, 0.08);
  color: var(--black-500);
}
.tb-rankings .li-badge.class-classab {
  background: rgba(59, 130, 246, 0.08);
  color: var(--blue-700);
}
.tb-rankings .li-badge.class-classd {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
}
.tb-rankings .li-badge.class-classgh {
  background: rgba(139, 92, 246, 0.08);
  color: #7c3aed;
}
