:root {
  --tools-max-width: 1040px;
}

.tools-body {
  background: var(--color-cloud);
}

.tools-main {
  padding: var(--section-padding);
}

.tools-shell {
  max-width: var(--tools-max-width);
  margin: 0 auto;
}

.tools-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

.tools-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.5rem);
  color: var(--color-midnight);
  margin: 0 0 0.75rem;
}

.tools-lead {
  margin: 0 0 1.5rem;
  color: #374151;
  max-width: 640px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
  margin-top: 2rem;
}

.tools-card {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tools-card__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold-muted);
  margin-bottom: 0.25rem;
}

.tools-card__title {
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: var(--color-midnight);
}

.tools-card__body {
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

.tools-card__actions {
  margin-top: auto;
}

.tools-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.tools-link svg {
  width: 1rem;
  height: 1rem;
}

.tools-section-heading {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-midnight);
}

.tools-section-lead {
  margin: 0 0 1.5rem;
  color: #4b5563;
}

.tools-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
}

.tools-tag--kids {
  background: rgba(54, 96, 227, 0.09);
  color: var(--color-electric);
}

.tools-tag--staff {
  background: rgba(3, 8, 23, 0.06);
  color: var(--color-midnight);
}

.tools-nav-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.tools-nav-inline a {
  font-size: 0.9rem;
}

.tools-safeguard-note {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #4b5563;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
}

/* ================================================
   STREAK QUEST - Game-like streak tracker
   ================================================ */

.streak-quest {
  margin-top: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Goal Selection */
.streak-goal-select {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.streak-goal-select__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-midnight);
  margin-bottom: 0.75rem;
}

.streak-goal-select__dropdown {
  width: 100%;
  max-width: 400px;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 2px solid #d1d5db;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.streak-goal-select__dropdown:focus {
  outline: none;
  border-color: var(--color-electric);
  box-shadow: 0 0 0 3px rgba(54, 96, 227, 0.1);
}

/* Main Streak Display - Flame & Counter */
.streak-display {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  position: relative;
  overflow: hidden;
}

.streak-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(54, 96, 227, 0.03) 0%, rgba(171, 160, 70, 0.03) 100%);
  pointer-events: none;
}

/* Flame Animation */
.streak-flame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.streak-flame__icon {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 4px 12px rgba(255, 107, 0, 0.4));
  transition: all 0.4s ease;
}

.streak-flame__icon.flame--small {
  width: 80px;
  height: 80px;
  opacity: 0.7;
}

.streak-flame__icon.flame--medium {
  width: 120px;
  height: 120px;
  opacity: 0.9;
}

.streak-flame__icon.flame--large {
  width: 160px;
  height: 160px;
  opacity: 1;
  animation: flamePulse 2s ease-in-out infinite;
}

.streak-flame__icon.flame--epic {
  width: 200px;
  height: 200px;
  opacity: 1;
  animation: flameEpic 1.5s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(255, 107, 0, 0.6));
}

@keyframes flamePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes flameEpic {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.1) rotate(2deg); }
}

.flame-path {
  animation: flameFlicker 0.3s ease-in-out infinite alternate;
}

@keyframes flameFlicker {
  0% { transform: scaleY(1); }
  100% { transform: scaleY(0.98); }
}

/* Streak Counter */
.streak-counter {
  text-align: center;
  position: relative;
  z-index: 1;
}

.streak-counter__number {
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-electric);
  text-shadow: 0 2px 8px rgba(54, 96, 227, 0.2);
  margin-bottom: 0.5rem;
}

.streak-counter__label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Badge Milestones */
.streak-badges {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.streak-badges__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-midnight);
  margin: 0 0 1rem;
  text-align: center;
}

.streak-badges__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.streak-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
}

.streak-badge__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  transition: all 0.3s ease;
  border: 3px solid transparent;
}

.streak-badge--locked .streak-badge__icon {
  background: #e5e7eb;
  color: #9ca3af;
  border-color: #d1d5db;
}

.streak-badge--unlocked .streak-badge__icon {
  background: linear-gradient(135deg, var(--color-electric) 0%, var(--color-gold) 100%);
  color: var(--color-white);
  border-color: var(--color-gold);
  box-shadow: 0 4px 12px rgba(54, 96, 227, 0.3);
}

.streak-badge--current {
  animation: badgePulse 1.5s ease-in-out infinite;
}

.streak-badge--current .streak-badge__icon {
  background: linear-gradient(135deg, #ffa500 0%, #ff6b00 100%);
  box-shadow: 0 4px 16px rgba(255, 107, 0, 0.5);
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.streak-badge__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
}

.streak-badge--unlocked .streak-badge__label {
  color: var(--color-electric);
}

.streak-badge--current .streak-badge__label {
  color: #ff6b00;
}

/* Message */
.streak-message {
  background: var(--color-gray);
  border-left: 4px solid var(--color-electric);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #374151;
}

/* Actions */
.streak-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Particle Canvas */
.streak-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Responsive */
@media (max-width: 600px) {
  .streak-display {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1.5rem;
  }

  .streak-counter__number {
    font-size: 4rem;
  }

  .streak-flame__icon.flame--large {
    width: 140px;
    height: 140px;
  }

  .streak-flame__icon.flame--epic {
    width: 160px;
    height: 160px;
  }

  .streak-badges__grid {
    gap: 0.75rem;
  }

  .streak-badge__icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}

.emotion-check {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

.emotion-check__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.emotion-check__button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.9rem 0.75rem;
  border-radius: var(--radius-soft);
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out, transform 0.1s ease-out,
    background 0.15s ease-out;
  font-family: var(--font-body);
}

.emotion-check__button:hover,
.emotion-check__button:focus-visible {
  border-color: var(--color-electric);
  box-shadow: var(--shadow-soft);
  outline: none;
  transform: translateY(-1px);
}

.emotion-check__button--active {
  border-color: var(--color-electric);
  background: rgba(54, 96, 227, 0.06);
}

.emotion-check__icon {
  font-size: 1.6rem;
}

.emotion-check__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.emotion-check__panel {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-soft);
}

.emotion-check__panel-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold-muted);
  margin-bottom: 0.25rem;
}

.emotion-check__panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.emotion-check__panel-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(54, 96, 227, 0.06);
  font-size: 1.5rem;
}

.emotion-check__panel-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-midnight);
}

.emotion-check__panel-text {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.95rem;
  color: #4b5563;
}

.emotion-check__actions-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: #374151;
}

.emotion-check__actions-list li + li {
  margin-top: 0.25rem;
}

.emotion-check__more {
  margin-top: 0.75rem;
}

@media (max-width: 600px) {
  .emotion-check__panel-header {
    align-items: flex-start;
  }
}

.timer-tool {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

.timer-tool__display {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.timer-tool__time {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 4rem);
  text-align: center;
  color: var(--color-midnight);
  margin-bottom: 1.25rem;
}

.timer-tool__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.timer-tool__step-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold-muted);
  margin-bottom: 0.25rem;
  display: block;
}

.timer-tool__step-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.timer-tool__step-input:focus-visible {
  outline: 2px solid var(--color-electric);
  outline-offset: 1px;
}

.timer-tool__controls {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1.5fr);
  gap: 1rem;
  align-items: center;
}

.timer-tool__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timer-tool__preset {
  min-width: 3.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-body);
}

.timer-tool__preset--active {
  border-color: var(--color-electric);
  background: rgba(54, 96, 227, 0.06);
}

.timer-tool__main-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.timer-tool__custom {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.timer-tool__custom-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold-muted);
}

.timer-tool__custom-input {
  width: 100%;
  max-width: 120px;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.timer-tool__custom-input:focus-visible {
  outline: 2px solid var(--color-electric);
  outline-offset: 1px;
}

.timer-tool--fullscreen {
  background: var(--color-midnight);
  color: var(--color-white);
  padding: 2rem 1rem;
}

.timer-tool--fullscreen .timer-tool__display {
  background: transparent;
  box-shadow: none;
}

.timer-tool--fullscreen .timer-tool__time {
  color: var(--color-white);
}

.timer-tool--fullscreen .timer-tool__step-label {
  color: var(--color-lilac);
}

.timer-tool--fullscreen .timer-tool__step-input {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--color-white);
}

.timer-tool--fullscreen .timer-tool__controls {
  grid-template-columns: 1.2fr 1.5fr 1fr;
}

@media (max-width: 900px) {
  .timer-tool__controls {
    grid-template-columns: 1fr;
  }
}


/* ================================================
   REWARD SPINNER - Game-like spinning wheel
   ================================================ */

.reward-spinner {
  margin-top: 2rem;
  position: relative;
}

/* Category Selection Cards */
.spinner-category {
  text-align: center;
}

.spinner-category__title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-midnight);
  margin: 0 0 1.5rem;
}

.spinner-category__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.category-card {
  background: var(--color-white);
  border: 3px solid transparent;
  border-radius: var(--radius-soft);
  padding: 2rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.3) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.category-card:hover::before {
  opacity: 1;
}

.category-card:active {
  transform: translateY(-2px);
}

.category-card--quick {
  border-color: var(--color-electric);
  background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
}

.category-card--bigger {
  border-color: var(--color-gold);
  background: linear-gradient(135deg, #ffffff 0%, #fffdf0 100%);
}

.category-card__icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.category-card__title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-midnight);
  margin: 0;
}

.category-card__subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
}

.category-card__count {
  font-size: 0.85rem;
  color: var(--color-electric);
  font-weight: 600;
  margin-top: 0.5rem;
}

.category-card--bigger .category-card__count {
  color: var(--color-gold);
}

/* Spinner Game Area */
.spinner-game {
  animation: fadeIn 0.4s ease;
}

.spinner-game__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Spinning Wheel Layout */
.spinner-wheel-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.spinner-wheel-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.spinner-wheel {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.wheel-svg {
  width: 100%;
  height: 100%;
  transform-origin: center;
  transition: transform 0.1s ease-out;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.15));
  border-radius: 50%;
}

.wheel-svg.spinning {
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.3, 0.99);
}

.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--color-white);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2), inset 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

.wheel-center__inner {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-midnight);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.wheel-pointer {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.5rem;
  color: var(--color-gold);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  z-index: 20;
  animation: pointerBounce 2s ease-in-out infinite;
}

@keyframes pointerBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(4px); }
}

/* Reward Legend */
.reward-legend {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
  min-width: 280px;
  max-height: 500px;
  overflow-y: auto;
}

.reward-legend__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reward-legend__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.reward-legend__item:hover {
  background: var(--color-gray);
}

.reward-legend__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-electric);
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.reward-legend__text {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.4;
}

.reward-legend__empty {
  font-size: 0.9rem;
  color: #9ca3af;
  text-align: center;
  margin: 0;
}

/* Result Display */
.spinner-result {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.spinner-result__text {
  font-size: 1.1rem;
  color: #6b7280;
  margin: 0;
  text-align: center;
}

.spinner-result__text.winner {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-electric);
  animation: winnerPulse 0.6s ease;
}

@keyframes winnerPulse {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* Actions */
.spinner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.btn--primary {
  background: var(--color-electric);
  color: var(--color-white);
  border: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn--primary:hover {
  background: var(--color-indigo);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(54, 96, 227, 0.3);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.spinner-hint {
  text-align: center;
  font-size: 0.9rem;
  color: #9ca3af;
  margin-top: 1rem;
}

/* Confetti Canvas */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 900px) {
  .spinner-wheel-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .reward-legend {
    max-height: 300px;
  }
}

@media (max-width: 600px) {
  .spinner-category__cards {
    grid-template-columns: 1fr;
  }

  .category-card {
    padding: 1.5rem 1rem;
  }

  .spinner-wheel-container {
    max-width: 90vw;
  }

  .spinner-result__text.winner {
    font-size: 1.4rem;
  }

  .reward-legend {
    min-width: auto;
  }
}

.stories {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr);
  gap: 1rem;
}

.stories__sidebar {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.25rem;
}

.stories__sidebar-title {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.stories__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stories__item {
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #111827;
  border: 1px solid transparent;
}

.stories__item:hover,
.stories__item:focus-visible {
  background: #f3f4f6;
  outline: none;
}

.stories__item--active {
  border-color: var(--color-electric);
  background: rgba(54, 96, 227, 0.06);
}

.stories__panel {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
  min-height: 220px;
}

.stories__empty {
  margin: 0;
  font-size: 0.95rem;
  color: #4b5563;
}

.stories__step-count {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.stories__step-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.stories__step-text {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #374151;
}

.stories__controls {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .stories {
    grid-template-columns: 1fr;
  }
}

.reflection {
  margin-top: 2rem;
  background: var(--color-white);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem 1.75rem;
}

.reflection__header {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.reflection__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.reflection__section {
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-soft);
  padding: 0.75rem 0.9rem;
}

.reflection__section-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.reflection__list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.reflection__item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #374151;
}

.reflection__item + .reflection__item {
  margin-top: 0.2rem;
}

.reflection__checkbox {
  margin-top: 0.2rem;
}

.reflection__label {
  cursor: pointer;
}

.reflection__actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Print-only elements (hidden on screen) */
.reflection-print-logo,
.reflection-print-header {
  display: none;
}

@media print {
  header.site-header,
  .footer,
  .tools-safeguard-note,
  .tools-kicker,
  .tools-lead {
    display: none !important;
  }

  body {
    background: #ffffff !important;
  }

  .tools-main {
    padding: 0;
  }

  .tools-shell {
    max-width: 100%;
  }

  .reflection {
    box-shadow: none;
    border: none;
  }

  /* Show and center logo when printing */
  .reflection-print-logo {
    display: block;
    max-width: 200px;
    height: auto;
    margin: 0 auto 1.5rem;
  }

  /* Center the title when printing */
  .tools-title {
    text-align: center;
    margin-bottom: 1.5rem;
  }

  /* Show print header (name/date fields) when printing */
  .reflection-print-header {
    display: block;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #ddd;
  }

  .reflection-print-field {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .reflection-print-field label {
    font-weight: 600;
    min-width: 60px;
  }

  .reflection-print-line {
    flex: 1;
    border-bottom: 1px solid #333;
    height: 1.5rem;
  }
}

.calm-cards {
  margin-top: 2rem;
  display: grid;
  gap: 1.25rem;
}

.calm-cards__filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.calm-cards__filter-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold-muted);
  display: block;
  margin-bottom: 0.25rem;
}

.calm-cards__filter-select,
.calm-cards__filter-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.calm-cards__filter-select:focus-visible,
.calm-cards__filter-input:focus-visible {
  outline: 2px solid var(--color-electric);
  outline-offset: 1px;
}

.calm-cards__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.calm-cards__card {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.calm-cards__card-header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

.calm-cards__card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.calm-cards__chip {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(54, 96, 227, 0.06);
  color: var(--color-electric);
  text-transform: capitalize;
}

.calm-cards__sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.calm-cards__section-title {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #111827;
}

.calm-cards__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: #374151;
}

.calm-cards__list li + li {
  margin-top: 0.2rem;
}

.calm-cards__empty {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}

@media (max-width: 900px) {
  .calm-cards__sections {
    grid-template-columns: 1fr;
  }
}

.routine {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: 1rem;
}

.routine__sidebar {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.routine__sidebar-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.routine__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.routine__item {
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 0.9rem;
}

.routine__item:hover,
.routine__item:focus-visible {
  background: #e5e7eb;
  outline: none;
}

.routine__empty {
  font-size: 0.9rem;
  color: #6b7280;
}

.routine__clear {
  align-self: flex-start;
}

.routine__main {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.8fr);
  gap: 1rem;
}

.routine__builder,
.routine__runner {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.4rem;
}

.routine__heading {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.routine__builder-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.routine__label {
  font-size: 0.85rem;
  color: #4b5563;
}

.routine__label--inline {
  margin-left: 0.25rem;
}

.routine__input {
  flex: 1 1 180px;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.routine__input--small {
  flex: 0 0 70px;
  text-align: center;
}

.routine__steps {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: #374151;
  max-height: 8.5rem;
  overflow-y: auto;
}

.routine__steps-empty {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.routine__step-item + .routine__step-item {
  margin-top: 0.2rem;
}

.routine__builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.routine__current-name {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: #374151;
}

.routine__stage {
  border-radius: var(--radius-soft);
  background: var(--color-gray);
  padding: 1.25rem 1rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

.routine__stage-label {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.routine__stage-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.routine__stage-time {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-midnight);
}

.routine__runner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.routine__runner-note {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}

@media (max-width: 900px) {
  .routine {
    grid-template-columns: 1fr;
  }

  .routine__main {
    grid-template-columns: 1fr;
  }
}

.btn--subtle {
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  box-shadow: none;
}

.btn--subtle:hover,
.btn--subtle:focus-visible {
  background: #f3f4f6;
}

@media (max-width: 600px) {
  .streak-quest__headline {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   WEEKLY TARGET TRACKER
   ============================================ */

.weekly-tracker {
  max-width: 1000px;
  margin: 0 auto;
}

/* Setup Section */
.weekly-setup {
  display: grid;
  gap: 2rem;
}

.weekly-details {
  background: var(--color-white);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
}

.weekly-details__title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-midnight);
}

.weekly-details__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.weekly-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.weekly-field__label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-midnight);
}

.weekly-field__input {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.weekly-field__input:focus {
  outline: none;
  border-color: var(--color-electric);
  box-shadow: 0 0 0 3px rgba(54, 96, 227, 0.1);
}

/* Target Selection */
.weekly-selection {
  background: var(--color-white);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
}

.weekly-selection__title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-midnight);
}

.weekly-selection__subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: #6b7280;
}

/* Selected Targets Display */
.weekly-selected {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
}

.weekly-selected__slot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--color-white);
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.weekly-selected__slot--filled {
  border-style: solid;
  border-color: var(--color-electric);
  background: #eff6ff;
}

.weekly-selected__number {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-midnight);
  min-width: 1.5rem;
}

.weekly-selected__text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--color-midnight);
}

.weekly-selected__slot:not(.weekly-selected__slot--filled) .weekly-selected__text {
  color: #9ca3af;
  font-style: italic;
}

/* Target Library */
.weekly-library {
  display: grid;
  gap: 1.5rem;
}

.weekly-category {
  display: grid;
  gap: 0.75rem;
}

.weekly-category__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gold);
}

.weekly-category__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.weekly-target-btn {
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-midnight);
  font-size: 0.9rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.weekly-target-btn:hover {
  border-color: var(--color-electric);
  background: #f0f9ff;
}

.weekly-target-btn--selected {
  border-color: var(--color-electric);
  background: var(--color-electric);
  color: var(--color-white);
  font-weight: 500;
}

.weekly-target-btn--selected:hover {
  background: #2d4fc7;
  border-color: #2d4fc7;
}

/* Actions */
.weekly-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Print Sheet - Hidden on Screen */
.weekly-sheet {
  display: none;
}

.weekly-print-logo {
  display: none;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  /* Hide setup UI */
  .weekly-setup,
  .tools-kicker,
  .tools-title,
  .tools-lead {
    display: none !important;
  }

  /* Show sheet and logo */
  .weekly-sheet {
    display: block !important;
  }

  .weekly-print-logo {
    display: block;
    max-width: 140px;
    height: auto;
    margin: 0 auto 0.5rem;
  }

  /* Print Header */
  .weekly-print-header {
    margin-bottom: 0.75rem;
  }

  .weekly-sheet__title {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    color: var(--color-midnight);
  }

  .weekly-print-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
  }

  .weekly-print-field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
  }

  .weekly-print-field label {
    font-weight: 600;
    white-space: nowrap;
  }

  .weekly-print-line {
    flex: 1;
    border-bottom: 1px solid #000;
    min-height: 1.2rem;
  }

  .weekly-print-line--short {
    flex: none;
    width: 40px;
    text-align: center;
  }

  .weekly-print-field__suffix {
    font-weight: 600;
  }

  /* Table Styling */
  .weekly-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
  }

  .weekly-table__header {
    padding: 0.35rem 0.25rem;
    border: 2px solid #000;
    background: #f3f4f6;
    font-weight: 700;
    text-align: center;
    font-size: 0.7rem;
  }

  .weekly-table__header--goal {
    text-align: left;
    width: 35%;
  }

  .weekly-table__header--summary {
    width: 12%;
  }

  .weekly-table__row {
    border-bottom: 1px solid #d1d5db;
  }

  .weekly-table__row:nth-child(odd) {
    background: #f9fafb;
  }

  .weekly-table__goal {
    padding: 0.4rem 0.35rem;
    border-left: 2px solid #000;
    border-right: 1px solid #d1d5db;
    font-size: 0.75rem;
    font-weight: 500;
  }

  .weekly-table__cell {
    padding: 0.25rem;
    border-right: 1px solid #d1d5db;
    text-align: center;
  }

  .weekly-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #000;
    border-radius: 2px;
    margin: 0 auto;
    background: #fff;
  }

  .weekly-table__summary {
    padding: 0.4rem 0.35rem;
    border-right: 2px solid #000;
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
  }

  .weekly-table__totals {
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    background: #f3f4f6 !important;
    font-weight: 700;
  }

  .weekly-table__totals-label {
    padding: 0.4rem 0.35rem;
    border-left: 2px solid #000;
    border-right: 1px solid #000;
    font-size: 0.75rem;
  }

  .weekly-table__totals-cell {
    padding: 0.4rem 0.35rem;
    border-right: 1px solid #000;
    text-align: center;
    font-size: 0.75rem;
  }

  .weekly-table__totals-cell:last-child {
    border-right: 2px solid #000;
  }

  /* Achievement Section */
  .weekly-achievement {
    margin-bottom: 0.5rem;
    padding: 0.4rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
  }

  /* Reflections */
  .weekly-reflections {
    display: grid;
    gap: 0.5rem;
  }

  .weekly-reflection {
    page-break-inside: avoid;
  }

  .weekly-reflection strong {
    font-size: 0.85rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
  }

  .weekly-reflection__line {
    border-bottom: 1px solid #000;
    min-height: 1.2rem;
    margin-bottom: 0.25rem;
  }

  /* Page break control */
  .weekly-table {
    page-break-inside: avoid;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .weekly-category__grid {
    grid-template-columns: 1fr;
  }

  .weekly-details__fields {
    grid-template-columns: 1fr;
  }
}

