/* ========================================
   CATEGORIES
   ======================================== */
.categories {
  padding: 96px 24px 80px;
  background: transparent;
}

.learn-about-intro {
  max-width: 860px;
  margin: 0 auto 42px;
  text-align: center;
}

.learn-about-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  color: rgb(28, 31, 53, 0.48);
}

.learn-about-intro h2 {
  font-size: 2.35rem;
  margin-bottom: 14px;
}

.category-showcase-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  grid-template-rows: 570px;
  gap: 28px;
  align-items: stretch;
}

.category-selector-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 96px;
}

/* Hide Journal everywhere */
[data-category-target='journal'],
[data-category-panel='journal'] {
  display: none !important;
}

.category-selector-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 132px;
  flex: 1;
  padding: 18px 20px;
  border: 1px solid rgb(22, 93, 252, 0.1);
  border-radius: 33px;
  background: rgb(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 32px rgb(10, 17, 40, 0.06);
  text-align: left;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.category-selector-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgb(10, 17, 40, 0.1);
}

.category-selector-card.is-active {
  border-color: rgb(22, 93, 252, 0.55);
  background: linear-gradient(180deg, rgb(255, 255, 255, 0.98), rgb(232, 238, 255, 0.98));
  box-shadow: 0 20px 40px rgb(22, 93, 252, 0.2);
}

.category-selector-card.is-active::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--primary-gradient);
}

.category-selector-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 33px;
  background: rgb(22, 93, 252, 0.08);
  position: absolute;
  top: 16px;
  right: 16px;
}

.category-selector-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  padding-right: 52px;
}

.category-selector-copy {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-body);
  max-width: 28ch;
  padding-right: 12px;
}

.category-detail-surface {
  display: flex;
  position: relative;
  min-width: 0;
  align-self: stretch;
  overflow: hidden;
}

[data-category-panel][hidden] {
  display: none !important;
}

.category-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: start;
  align-content: start;
  flex: 1;
  gap: 18px 20px;
  background: var(--white);
  border-radius: 33px;
  box-shadow: 0 2px 16px rgb(0, 0, 0, 0.04);
  padding: 32px;
  overflow: hidden;
}

.category-detail-surface > .category-row {
  width: 100%;
  min-height: 100%;
}

.category-row-has-launch-bar {
  position: relative;
  overflow: visible;
  padding-top: 26px;
}

#category-panel-journal.category-row {
  gap: 12px 16px;
  padding: 24px 24px 22px;
  grid-template-rows: auto 1fr;
  align-content: stretch;
}

#category-panel-journal .category-info h3 {
  font-size: 1.18rem;
}

.category-row-has-launch-bar .carousel-wrapper {
  margin: 10px 0 0;
  width: 100%;
}

.category-row-has-launch-bar .journal-preview {
  margin-top: 6px;
}

.category-info {
  display: contents;
}

.category-info-header {
  display: flex;
  flex-direction: column;
  grid-column: 1;
  align-self: start;
  overflow: visible;
}

.category-icon {
  width: auto;
  height: auto;
  display: none;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 16px;
}

.category-icon svg,
.category-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.category-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0;
}

.category-info p {
  grid-column: 1 / -1;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
  max-width: none;
  align-self: start;
  display: none;
}

.category-launch-bar {
  position: absolute;
  top: 8px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: fit-content;
  margin-top: 0;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--primary-blue);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgb(22, 93, 252, 0.22);
  z-index: 2;
}

.journal-preview {
  grid-column: 1 / -1;
  display: flex;
  flex: 1;
  align-self: stretch;
  min-width: 0;
  min-height: clamp(340px, 38vw, 460px);
  height: auto;
}

.journal-sequence-canvas {
  position: relative;
  flex: 1;
  height: 100%;
  width: 100%;
  min-width: 0;
  min-height: inherit;
  overflow: hidden;
}

.journal-sequence-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  min-height: 100%;
  padding: 0;
  pointer-events: none;
  transition:
    opacity 0.42s ease,
    transform 0.42s ease,
    visibility 0s linear 0.42s;
}

.journal-sequence-stage.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity 0.42s ease,
    transform 0.42s ease,
    visibility 0s linear 0s;
}

.journal-sequence-stage-prompt,
.journal-sequence-stage-entry,
.journal-sequence-stage-emotions,
.journal-sequence-stage-score,
.journal-sequence-stage-graph {
  min-height: 100%;
}

.journal-sequence-stage-graph .journal-preview-head {
  margin-bottom: 10px;
}

.journal-sequence-stage-graph .journal-preview-head p {
  margin-top: 2px;
}

.journal-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.journal-preview-head-stack {
  align-items: flex-start;
}

.journal-preview-head h4 {
  font-size: 1.08rem;
  line-height: 1.15;
}

.journal-preview-head p {
  margin: 2px 0 0;
  font-size: 0.84rem;
  color: var(--text-body);
}

.journal-preview-link {
  color: rgb(28, 31, 53, 0.72);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.journal-prompt-choice-list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  gap: 14px;
  max-width: 760px;
  width: 100%;
  padding: 0 6px;
  box-sizing: border-box;
  margin: auto;
}

.journal-prompt-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid rgb(225, 231, 245, 0.95);
  border-radius: 22px;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
  opacity: 1;
  transform: translateY(0);
}

.journal-prompt-choice.is-selected {
  border-color: rgb(225, 231, 245, 0.95);
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
  box-shadow: none;
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-prompt.is-active
  .journal-prompt-choice {
  opacity: 0;
  transform: translateY(8px);
  animation: journalChoiceIn 0.38s ease forwards;
  animation-delay: var(--choice-delay, 0s);
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-prompt.is-active
  .journal-prompt-choice.is-selected {
  animation:
    journalChoiceIn 0.38s ease forwards,
    journalChoiceSelect 0.36s ease forwards;
  animation-delay: var(--choice-delay, 0s), calc(var(--choice-delay, 0s) + 0.45s);
}

.journal-prompt-choice-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #eb7d05;
}

.journal-prompt-choice-icon svg {
  width: 100%;
  height: 100%;
}

.journal-prompt-choice-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.journal-prompt-choice-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  color: rgb(28, 31, 53, 0.48);
}

.journal-prompt-choice-title {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-heading);
}

.journal-entry-window {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
  padding: 18px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
  border: 1px solid rgb(225, 231, 245, 0.95);
  overflow: hidden;
}

.journal-entry-line {
  position: relative;
  display: inline-block;
  width: 0;
  max-width: 100%;
  margin-top: 6px;
  overflow: hidden;
  white-space: nowrap;
  color: rgb(28, 31, 53, 0.82);
  font-size: 0.98rem;
  line-height: 1.55;
  vertical-align: top;
}

.journal-entry-line:first-child {
  margin-top: 0;
}

.journal-entry-line::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 22px;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: var(--primary-blue);
  opacity: 0;
}

.journal-sequence-canvas.is-running .journal-sequence-stage-entry.is-active .journal-entry-line {
  animation: journalTyping var(--line-duration, 1.45s) steps(36, end) forwards;
  animation-delay: var(--line-delay, 0s);
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-entry.is-active
  .journal-entry-line::after {
  animation: journalLineCaret var(--line-duration, 1.45s) steps(1, end) forwards;
  animation-delay: var(--line-delay, 0s);
}

.journal-emotion-chips,
.journal-emotion-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.journal-emotion-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgb(225, 231, 245, 0.95);
  border-radius: var(--radius-pill);
  background: rgb(255, 255, 255, 0.96);
  color: var(--text-heading);
  font-size: 0.72rem;
  font-weight: 500;
}

.journal-emotion-picker {
  place-content: center center;
  align-items: center;
  flex: 1;
  gap: 14px;
  margin: auto 0;
}

.journal-selection-chip {
  min-height: 48px;
  padding: 0 18px;
  opacity: 0.52;
  transform: scale(0.96);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.journal-selection-chip.is-selected {
  opacity: 0.52;
  transform: scale(0.96);
  background: rgb(255, 255, 255, 0.96);
  border-color: rgb(225, 231, 245, 0.95);
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-emotions.is-active
  .journal-selection-chip.is-selected {
  animation: journalChipPick 0.42s ease forwards;
  animation-delay: var(--pick-delay, 0s);
}

.journal-score-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  min-height: 0;
  padding: 18px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
  border: 1px solid rgb(225, 231, 245, 0.95);
  overflow: hidden;
}

.journal-score-option-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.journal-score-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgb(225, 231, 245, 0.95);
  border-radius: var(--radius-pill);
  background: rgb(255, 255, 255, 0.96);
  color: rgb(28, 31, 53, 0.76);
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
}

.journal-score-chip.is-selected {
  color: var(--primary-blue);
}

.journal-score-confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.journal-score-confirm-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  color: rgb(28, 31, 53, 0.48);
}

.journal-score-confirm-value {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--primary-blue);
}

.journal-sequence-canvas.is-running .journal-sequence-stage-score.is-active .journal-score-chip {
  animation: journalChoiceIn 0.34s ease forwards;
  animation-delay: var(--score-delay, 0s);
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-score.is-active
  .journal-score-chip.is-selected {
  animation:
    journalChoiceIn 0.34s ease forwards,
    journalChoiceSelect 0.34s ease forwards;
  animation-delay: var(--score-delay, 0s), calc(var(--score-delay, 0s) + 0.42s);
}

.journal-sequence-canvas.is-running .journal-sequence-stage-score.is-active .journal-score-confirm {
  animation: journalGraphWindowIn 0.42s ease 1.28s forwards;
}

.journal-graph-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  justify-content: stretch;
  padding: 12px 14px 10px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
  border: 1px solid rgb(225, 231, 245, 0.95);
  overflow: hidden;
}

.journal-sequence-stage-graph .journal-graph-window {
  opacity: 0;
  transform: translateY(8px) scale(0.985);
}

.journal-sequence-canvas.is-running .journal-sequence-stage-graph.is-active .journal-graph-window {
  animation: journalGraphWindowIn 0.5s ease 0.1s forwards;
}

.journal-graph-emotions {
  margin-top: 8px;
  margin-bottom: 0;
}

.journal-graph-emotion-chip {
  min-height: 28px;
  font-size: 0.68rem;
}

.journal-emotion-chip-icon {
  width: 13px;
  height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--emotion-color, var(--primary-blue));
}

.journal-emotion-chip-icon svg {
  width: 100%;
  height: 100%;
}

.journal-mood-chart {
  flex: 1;
  min-height: 0;
  margin: 0 -2px -2px;
  overflow: hidden;
}

.journal-mood-chart svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: none;
}

.journal-sequence-stage-graph .journal-chart-grid line,
.journal-sequence-stage-graph .journal-chart-axis text,
.journal-sequence-stage-graph .journal-graph-emotions {
  opacity: 0;
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-graph.is-active
  .journal-chart-grid
  line,
.journal-sequence-canvas.is-running
  .journal-sequence-stage-graph.is-active
  .journal-chart-axis
  text,
.journal-sequence-canvas.is-running
  .journal-sequence-stage-graph.is-active
  .journal-graph-emotions {
  animation: journalGraphFadeIn 0.55s ease 0.5s forwards;
}

.journal-chart-grid line {
  stroke: rgb(28, 31, 53, 0.12);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.journal-chart-axis text {
  fill: rgb(28, 31, 53, 0.62);
  font-size: 9px;
  font-weight: 500;
}

.journal-chart-axis-x text {
  font-size: 8px;
}

.journal-chart-line {
  fill: none;
  stroke: #efa22f;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-graph.is-active
  .journal-chart-line-segment-1 {
  animation: journalChartDraw 0.34s cubic-bezier(0.33, 1, 0.68, 1) 0.84s forwards;
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-graph.is-active
  .journal-chart-line-segment-2 {
  animation: journalChartDraw 0.34s cubic-bezier(0.33, 1, 0.68, 1) 1.2s forwards;
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-graph.is-active
  .journal-chart-line-segment-3 {
  animation: journalChartDraw 0.38s cubic-bezier(0.33, 1, 0.68, 1) 1.56s forwards;
}

.journal-chart-point {
  stroke: var(--white);
  stroke-width: 4;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.journal-sequence-canvas.is-running .journal-sequence-stage-graph.is-active .journal-chart-point {
  animation: journalChartPointIn 0.26s ease forwards;
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-graph.is-active
  .journal-chart-point:nth-of-type(1) {
  animation-delay: 0.24s;
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-graph.is-active
  .journal-chart-point:nth-of-type(2) {
  animation-delay: 0.46s;
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-graph.is-active
  .journal-chart-point:nth-of-type(3) {
  animation-delay: 0.68s;
}

.journal-sequence-canvas.is-running
  .journal-sequence-stage-graph.is-active
  .journal-chart-point:nth-of-type(4) {
  animation-delay: 0.9s;
}

.journal-chart-point-positive {
  fill: #56be82;
}

.journal-chart-point-warning {
  fill: #efa22f;
}

@media (width >= 1440px) {
  .journal-preview,
  .journal-sequence-canvas {
    min-height: clamp(380px, 32vw, 500px);
  }

  .journal-sequence-stage {
    padding: 0;
  }

  .journal-preview-head h4 {
    font-size: 1rem;
  }

  .journal-preview-head p {
    font-size: 0.78rem;
  }

  .journal-entry-window {
    padding: 14px 18px;
  }

  .journal-prompt-choice {
    min-height: 68px;
    padding: 12px 14px;
  }

  .journal-prompt-choice-label {
    font-size: 0.68rem;
  }

  .journal-prompt-choice-title {
    font-size: 0.88rem;
  }

  .journal-entry-line {
    font-size: 0.88rem;
    line-height: 1.45;
    margin-top: 4px;
  }

  .journal-emotion-picker {
    gap: 12px;
  }

  .journal-selection-chip {
    min-height: 42px;
    padding: 0 15px;
    font-size: 0.76rem;
  }

  .journal-score-window {
    padding: 14px 18px;
    gap: 16px;
  }

  .journal-score-chip {
    min-width: 76px;
    min-height: 42px;
    font-size: 0.8rem;
  }

  .journal-score-confirm-value {
    font-size: 1.55rem;
  }

  .journal-graph-window {
    padding: 10px 12px 8px;
  }

  .journal-mood-chart {
    margin: 0;
  }

  .journal-graph-emotion-chip {
    min-height: 26px;
    font-size: 0.66rem;
  }
}

@keyframes journalChipPick {
  0% {
    opacity: 0.52;
    transform: scale(0.96);
    background: rgb(255, 255, 255, 0.96);
    border-color: rgb(225, 231, 245, 0.95);
  }

  60% {
    opacity: 1;
    transform: scale(1.04);
  }

  100% {
    opacity: 1;
    transform: scale(1);
    background: color-mix(in srgb, var(--emotion-color, var(--primary-blue)) 12%, white);
    border-color: color-mix(in srgb, var(--emotion-color, var(--primary-blue)) 42%, white);
  }
}

@keyframes journalChoiceIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 0.78;
    transform: translateY(0);
  }
}

@keyframes journalChoiceSelect {
  0% {
    opacity: 0.78;
    transform: scale(1);
    border-color: rgb(225, 231, 245, 0.95);
    background: linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
    box-shadow: none;
  }

  100% {
    opacity: 1;
    transform: scale(1.01);
    border-color: rgb(22, 93, 252, 0.4);
    background: linear-gradient(180deg, rgb(255, 255, 255, 0.98), rgb(232, 238, 255, 0.98));
    box-shadow: 0 10px 22px rgb(22, 93, 252, 0.12);
  }
}

@keyframes journalLineCaret {
  0%,
  18%,
  36%,
  54%,
  72%,
  90% {
    opacity: 1;
  }

  9%,
  27%,
  45%,
  63%,
  81%,
  100% {
    opacity: 0;
  }
}

@keyframes journalGraphWindowIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes journalGraphFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes journalEntryLineIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes journalChartDraw {
  from {
    stroke-dashoffset: 1;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes journalTyping {
  from {
    width: 0;
  }

  to {
    width: var(--line-target-width);
  }
}

@keyframes journalChartPointIn {
  from {
    opacity: 0;
    transform: scale(0.4);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.meditation-topics {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px -32px 0;
  padding: 0 32px;
}

.meditation-topics-label {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-heading);
}

.meditation-topics-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.meditation-topic-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 100%;
  width: 100%;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--text-heading);
  text-align: left;
}

.meditation-topic-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.meditation-topic-chip:nth-child(1) .meditation-topic-icon {
  color: #165dfc;
}

.meditation-topic-chip:nth-child(2) .meditation-topic-icon {
  color: #b67af3;
}

.meditation-topic-chip:nth-child(3) .meditation-topic-icon {
  color: #75ddb7;
}

.meditation-topic-chip:nth-child(4) .meditation-topic-icon {
  color: #165dfc;
}

.meditation-topic-chip:nth-child(5) .meditation-topic-icon {
  color: #b67af3;
}

.meditation-topic-icon svg,
.meditation-topic-icon img {
  width: 22px;
  height: 22px;
  display: block;
}

.meditation-topic-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  align-items: center;
}

.meditation-topic-title {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.meditation-topic-copy {
  max-width: none;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgb(28, 31, 53, 0.8);
}

.meditation-topic-link {
  margin-top: auto;
  align-self: center;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary-blue);
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.breathwork-topics {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px -32px 0;
  padding: 0 32px;
}

.breathwork-topics-label {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-heading);
}

.breathwork-topics-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.breathwork-topic-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 100%;
  width: 100%;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--text-heading);
  text-align: left;
}

.breathwork-topic-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.breathwork-topic-chip:nth-child(1) .breathwork-topic-icon {
  color: #165dfc;
}

.breathwork-topic-chip:nth-child(2) .breathwork-topic-icon {
  color: #165dfc;
}

.breathwork-topic-icon svg,
.breathwork-topic-icon img {
  width: 22px;
  height: 22px;
  display: block;
}

.breathwork-topic-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  align-items: center;
}

.breathwork-topic-title {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.breathwork-topic-copy {
  max-width: none;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgb(28, 31, 53, 0.8);
}

.breathwork-topic-link {
  margin-top: auto;
  align-self: center;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary-blue);
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.brain-topics {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px -32px 0;
  padding: 0 32px;
}

.brain-topics-label {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-heading);
}

.brain-topics-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.brain-topic-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 100%;
  width: 100%;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--text-heading);
  text-align: left;
}

.brain-topic-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brain-topic-chip:nth-child(1) .brain-topic-icon {
  color: #165dfc;
}

.brain-topic-chip:nth-child(2) .brain-topic-icon {
  color: #165dfc;
}

.brain-topic-chip:nth-child(3) .brain-topic-icon {
  color: #75a962;
}

.brain-topic-chip:nth-child(4) .brain-topic-icon {
  color: #165dfc;
}

.brain-topic-icon svg,
.brain-topic-icon img {
  width: 22px;
  height: 22px;
  display: block;
}

.brain-topic-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  align-items: center;
}

.brain-topic-title {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.brain-topic-copy {
  max-width: none;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgb(28, 31, 53, 0.8);
}

.brain-topic-link {
  margin-top: auto;
  align-self: center;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary-blue);
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

@media (width >= 1101px) {
  .meditation-topics,
  .breathwork-topics,
  .brain-topics {
    margin-top: 16px;
    padding: 0 32px;
    gap: 12px;
  }

  .meditation-topics-label,
  .breathwork-topics-label,
  .brain-topics-label {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-heading);
  }

  #category-panel-meditation .carousel-wrapper,
  #category-panel-breathwork .carousel-wrapper,
  #category-panel-brain .game-grid {
    min-height: 252px;
    align-content: start;
  }
}

.journal-topics {
  display: none;
  grid-column: 1 / -1;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 0;
}

.journal-topics-label {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-heading);
}

.journal-topics-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.journal-topic-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 100%;
  width: 100%;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--text-heading);
  text-align: center;
}

.journal-topic-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.journal-topic-chip:nth-child(1) .journal-topic-icon {
  color: #eb7d05;
}

.journal-topic-chip:nth-child(2) .journal-topic-icon {
  color: #ff5fa8;
}

.journal-topic-chip:nth-child(3) .journal-topic-icon {
  color: #165dfc;
}

.journal-topic-chip:nth-child(4) .journal-topic-icon {
  color: #56be82;
}

.journal-topic-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.journal-topic-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  align-items: center;
}

.journal-topic-title {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.journal-topic-copy {
  max-width: 22ch;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgb(28, 31, 53, 0.8);
}

.journal-topic-link {
  margin-top: auto;
  align-self: center;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary-blue);
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.category-topic-detail-panel {
  display: none;
}

.category-topic-detail-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(18, 24, 40, 0.42);
  z-index: 1400;
}

.category-topic-detail-overlay[hidden] {
  display: none;
}

.category-topic-detail-dialog {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  max-height: min(78vh, 720px);
  overflow: auto;
  padding: 24px 24px 22px;
  border: 1px solid rgb(225, 231, 245, 0.95);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 24px 56px rgb(18, 24, 40, 0.22);
}

.category-topic-detail-dialog h3 {
  margin: 0 28px 12px 0;
  font-size: 1.2rem;
  line-height: 1.15;
}

.category-topic-detail-dialog p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--text-body);
}

.category-topic-detail-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgb(22, 93, 252, 0.08);
  color: var(--primary-blue);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.learn-more-link-mobile {
  display: none;
  grid-column: 2;
  align-items: center;
  width: fit-content;
  padding: 0;
  color: var(--primary-blue);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.learn-more-link-mobile:hover {
  color: #165dfc;
}

/* Carousel */
.carousel-wrapper {
  grid-column: 1 / -1;
  flex: 1;
  overflow: hidden;
  position: relative;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  margin: 10px -32px 0;
  width: calc(100% + 64px);
  cursor: grab;
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  gap: 16px;
  will-change: transform;
  user-select: none;
}

.carousel-wrapper.is-dragging {
  cursor: grabbing;
}

.carousel-card {
  flex-shrink: 0;
  width: 200px;
  background: var(--white);
  border: 1px solid rgb(225, 231, 245, 0.95);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgb(0, 0, 0, 0.06);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.carousel-card:hover {
  transform: translateY(-2px);
}

.card-img {
  width: 100%;
  height: 140px;
  background: linear-gradient(
    135deg,
    hsl(var(--card-hue, 220) 60% 65%),
    hsl(var(--card-hue, 220) 45% 45%)
  );
  position: relative;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#category-panel-meditation .carousel-card,
#category-panel-breathwork .carousel-card {
  width: 224px;
}

#category-panel-meditation .card-img,
#category-panel-breathwork .card-img {
  height: 156px;
}

.card-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgb(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1;
}

.card-title {
  display: block;
  padding: 10px 12px 4px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-heading);
}

.card-instructor {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 12px;
  font-size: 0.75rem;
  color: var(--text-body);
}

.instructor-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    hsl(var(--av-hue, 220) 50% 70%),
    hsl(var(--av-hue, 220) 40% 50%)
  );
  flex-shrink: 0;
  overflow: hidden;
}

.instructor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Breath Counts Button */
.card-breath-counts {
  padding: 6px 10px 10px;
}

.breath-counts-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1.5px solid var(--primary-blue);
  border-radius: var(--radius-pill);
  color: var(--primary-blue);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 12px;
  cursor: pointer;
  font-family: var(--font-family);
  transition:
    background 0.2s,
    color 0.2s;
}

.breath-counts-btn::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--primary-blue);
  border-bottom: 2px solid var(--primary-blue);
  transform: rotate(45deg);
  margin-top: -3px;
  transition: border-color 0.2s;
}

.breath-counts-btn:hover {
  background: var(--primary-blue);
  color: var(--white);
}

.breath-counts-btn:hover::after {
  border-color: var(--white);
}

.breath-counts-panel {
  margin-top: 6px;
  padding: 0;
  background: var(--white);
  border: 1px solid rgb(225, 231, 245, 0.95);
  border-radius: 24px;
  box-shadow: 0 20px 48px rgb(18, 24, 40, 0.18);
  font-size: 0.78rem;
  color: var(--text-heading);
  overflow: hidden;
}

.breath-counts-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.breath-counts-panel li {
  padding: 10px 16px;
  border-bottom: 1px solid #eef0f5;
  font-weight: 500;
  line-height: 1.45;
}

.breath-counts-panel li:last-child {
  border-bottom: none;
}

.breath-counts-popover {
  position: fixed;
  width: min(300px, calc(100vw - 24px));
  max-height: min(320px, calc(100vh - 32px));
  background: var(--white);
  border: 1px solid rgb(225, 231, 245, 0.95);
  border-radius: 24px;
  box-shadow: 0 20px 48px rgb(18, 24, 40, 0.18);
  overflow: hidden;
  font-size: 0.78rem;
  color: var(--text-heading);
  z-index: 1200;
}

.breath-counts-popover[hidden] {
  display: none;
}

.breath-counts-popover ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.breath-counts-popover li {
  padding: 10px 16px;
  border-bottom: 1px solid #eef0f5;
  font-weight: 500;
  line-height: 1.45;
}

.breath-counts-popover li:last-child {
  border-bottom: none;
}

/* Game Grid (Brain Training) */
.game-grid {
  grid-column: 1 / -1;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
  padding: 8px 32px 0;
  margin: 0 -32px;
  width: calc(100% + 64px);
}

.game-carousel-mobile {
  display: none;
}

.game-card {
  background: var(--white);
  border: 1px solid rgb(225, 231, 245, 0.95);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgb(0, 0, 0, 0.06);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.game-card:hover {
  transform: translateY(-4px);
}

.game-card:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 3px;
}

.game-card .card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  position: relative;
}

.game-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-card .card-title {
  display: block;
  padding: 10px 10px 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-heading);
}

.game-desc {
  padding: 4px 10px 12px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.game-description-panel {
  display: none;
}

.game-description-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(18, 24, 40, 0.42);
  z-index: 1400;
}

.game-description-overlay[hidden] {
  display: none;
}

.game-description-dialog {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  padding: 24px 24px 22px;
  border: 1px solid rgb(225, 231, 245, 0.95);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 24px 56px rgb(18, 24, 40, 0.22);
}

.game-description-dialog h3 {
  margin: 0 28px 10px 0;
  font-size: 1.2rem;
  line-height: 1.15;
}

.game-description-dialog p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text-body);
}

.game-description-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgb(22, 93, 252, 0.08);
  color: var(--primary-blue);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
