.keyword-bubbles {
  position: relative;
  isolation: isolate;
  gap: 12px;
  padding: 24px 18px;
}

.keyword-bubble {
  width: var(--bubble);
  height: var(--bubble);
  min-width: 48px;
  min-height: 48px;
  border: 1px solid #0000000a;
  border-radius: 50%;
  background: var(--bubble-color);
  color: #25221f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
  container-type: inline-size;
  cursor: default;
  box-shadow: 0 4px 12px #16122a08;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  animation: bubble-float 4.8s ease-in-out infinite;
}

.keyword-bubble:nth-child(2n) { animation-delay: -.9s; }
.keyword-bubble:nth-child(3n) { animation-delay: -2.1s; }
.keyword-bubble:nth-child(5n) { animation-delay: -3.4s; }

.keyword-bubble:hover,
.keyword-bubble:focus-visible {
  transform: scale(1.12) translateY(-4px);
  box-shadow: 0 13px 28px #19114024;
  filter: saturate(1.12);
  outline: 2px solid #5c3df7;
  outline-offset: 3px;
  animation-play-state: paused;
  z-index: 2;
}

.keyword-bubble strong { max-width: 94%; font-size: clamp(5px, 9cqi, 13px); line-height: 1.12; overflow-wrap: anywhere; }
.keyword-bubble small { margin-top: 3px; font-size: clamp(4px, 7cqi, 10px); color: #756f68; line-height: 1.08; }
.keyword-bubble em { max-width: 92%; margin-top: 3px; font-size: clamp(4px, 6cqi, 9px); line-height: 1.08; font-style: normal; color: #726b63; overflow-wrap: anywhere; }
.keyword-bubble.positive { color: #fff; }
.keyword-bubble.positive small, .keyword-bubble.positive em { color: #e8fff6; }
.keyword-bubble.neutral { color: #3d2a06; }
.keyword-bubble.neutral small, .keyword-bubble.neutral em { color: #5d4311; }
.keyword-bubble.negative { color: #fff; }
.keyword-bubble.negative small, .keyword-bubble.negative em { color: #fff3f2; }

.health-keyword-card .card-head h3, .health-sentiment-card .card-head h3 { font-size: 15px; }
.health-keyword-card .card-head p, .health-sentiment-card .card-head p { font-size: 10px; }
.health-source-table .table-row { grid-template-columns: 96px 145px minmax(310px,1fr) 142px 92px 155px 112px; }
.health-source-table .table-header > span { font-size: 9px; }
.health-source-table time, .health-source-table > div > strong { font-size: 11px; }
.health-post-copy p { font-size: 11px; }
.health-post-copy small { font-size: 9px; }
.content-type { font-size: 8px; }
.review-category { justify-self: start; border-radius: 10px; padding: 6px 9px; background: #f3f1ee; color: #625e58; font-size: 8px; font-weight: 800; line-height: 1.25; }
.sentiment-pill { font-size: 8px; padding: 6px 9px; }
.review-shop { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700; color: #5d5953; }
.review-category.product-quality { background: #edf3ff; color: #41649e; }
.review-category.effectiveness { background: #e9f7f1; color: #23835f; }
.review-category.price-value { background: #fff3dc; color: #9a681a; }
.review-category.delivery { background: #f2edff; color: #7352a2; }
.review-category.customer-service { background: #e9f6fb; color: #277b98; }
.review-category.trust { background: #edeafe; color: #4c3aa5; }
.review-category.purchase-intent { background: #f8edf6; color: #9c4e84; }

.health-sentiment-card { min-height: 470px; }
.review-category-chart { margin-top: 4px; padding-top: 16px; border-top: 1px solid #eeeae5; }
.review-category-chart h4 { margin: 0; font: 800 12px Manrope; color: #2d2a27; }
.review-category-chart > div:first-child > span { display: block; margin-top: 3px; font-size: 9px; color: #99938c; }
.review-category-bars { display: grid; gap: 8px; margin-top: 12px; }
.review-category-bars > div { display: grid; grid-template-columns: 106px minmax(45px,1fr) 18px; gap: 7px; align-items: center; }
.review-category-bars > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; color: #625e58; }
.review-category-bars i { display: block; height: 7px; overflow: hidden; border-radius: 99px; background: #efede9; }
.review-category-bars b { display: block; height: 100%; border-radius: inherit; background: #8b8a87; transition: width .3s ease; }
.review-category-bars b.product-quality { background: #6d91cb; }
.review-category-bars b.effectiveness { background: #35a678; }
.review-category-bars b.price-value { background: #e2aa3b; }
.review-category-bars b.delivery { background: #9370c3; }
.review-category-bars b.customer-service { background: #43a6c5; }
.review-category-bars b.trust { background: #755ee9; }
.review-category-bars b.purchase-intent { background: #c16da8; }
.review-category-bars > div > strong { font-size: 10px; text-align: right; color: #3b3835; }
.review-category-empty { margin: 13px 0 0; color: #99938c; font-size: 8px; }

@media (max-width: 900px) { .health-source-table { min-width: 1100px; } }

@keyframes bubble-float {
  0%,100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}

@media (prefers-reduced-motion: reduce) { .keyword-bubble { animation: none; } }
