/* Feelings */
.feeling-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 11px;
}
.feeling-button {
  min-height: 132px;
  padding: 15px 10px;
  border: 3px solid transparent;
  border-radius: 23px;
  background: var(--page);
  color: var(--ink);
  box-shadow: var(--shadow-small);
  font-weight: 950;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.feeling-button:hover { transform: translateY(-2px); }
.feeling-button:active { transform: scale(0.97); }
.feeling-button[aria-pressed="true"] {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 12%, var(--surface-solid));
}
.feeling-face { display: block; margin-bottom: 7px; font-size: 2.25rem; }
.feeling-button > span:not(.feeling-face) { display: block; font-size: 1rem; }
.feeling-button small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
  line-height: 1.3;
}
.suggestion {
  min-height: 52px;
  margin: 15px 0 0;
  padding: 13px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--yellow) 19%, var(--surface-solid));
  color: var(--soft-ink);
  font-weight: 820;
  line-height: 1.45;
}

/* Activity centre */
.activity-centre { overflow: visible; }
.activity-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -4px 18px;
  padding: 4px 4px 10px;
  scrollbar-width: none;
}
.activity-tabs::-webkit-scrollbar { display: none; }
.activity-tab {
  flex: 0 0 auto;
  min-width: 112px;
  min-height: 54px;
  padding: 11px 15px;
  border: 2px solid var(--line);
  border-radius: 17px;
  background: var(--surface-solid);
  color: var(--soft-ink);
  font-weight: 930;
  white-space: nowrap;
}
.activity-tab.is-active,
.activity-tab[aria-selected="true"] {
  border-color: var(--purple);
  background: color-mix(in srgb, var(--purple) 14%, var(--surface-solid));
  color: var(--ink);
  box-shadow: var(--shadow-small);
}
.activity-panel {
  min-height: 360px;
  padding: clamp(16px, 3.5vw, 26px);
  border: 2px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface-solid), color-mix(in srgb, var(--page) 55%, var(--surface-solid)));
}
.activity-panel[hidden] { display: none; }
.game-intro { text-align: center; }
.game-intro h3 {
  margin-bottom: 7px;
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  letter-spacing: -0.025em;
}
.game-intro p {
  max-width: 680px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-weight: 760;
  line-height: 1.45;
}
.game-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
.game-controls.three { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.game-button {
  min-height: 54px;
  padding: 11px 17px;
  border: 2px solid var(--line);
  border-radius: 17px;
  background: var(--surface-solid);
  color: var(--ink);
  box-shadow: var(--shadow-small);
  font-weight: 920;
}
.game-button.primary {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 14%, var(--surface-solid));
}
.game-button.compact { min-height: 48px; padding: 8px 18px; }
.game-button:active { transform: scale(0.97); }
.game-status {
  min-height: 48px;
  margin: 14px auto 0;
  padding: 12px 14px;
  border-radius: 15px;
  background: var(--page);
  color: var(--soft-ink);
  text-align: center;
  font-weight: 820;
  line-height: 1.4;
}

/* Dash game */
.dash-lane {
  position: relative;
  height: 154px;
  max-width: 850px;
  margin: 10px auto 2px;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--blue) 11%, var(--surface-solid)) 0 62%, color-mix(in srgb, var(--green) 12%, var(--surface-solid)) 62% 100%);
}
.lane-dots {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 29px;
  height: 5px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, var(--muted) 0 18px, transparent 18px 34px);
  opacity: 0.28;
}
.dash-buddy {
  position: absolute;
  left: 15px;
  bottom: 38px;
  width: 68px;
  height: 54px;
  overflow: hidden;
  border: 5px solid var(--ink);
  border-radius: 17px;
  background: var(--surface-solid);
  transform: translateX(var(--dash-x, 0px));
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 2;
}
.dash-buddy::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 14px;
  width: 10px;
  height: 21px;
  border-radius: 0 5px 5px 0;
  background: var(--ink);
}
.mini-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--energy);
  background: var(--energy-colour);
  opacity: 0.85;
}
.mini-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  color: #15233d;
  font-weight: 1000;
}
.charge-dock {
  position: absolute;
  right: 14px;
  bottom: 25px;
  display: grid;
  place-items: center;
  width: 82px;
  height: 92px;
  border: 5px solid var(--ink);
  border-radius: 22px 22px 12px 12px;
  background: linear-gradient(180deg, var(--yellow), var(--orange));
  color: #15233d;
  box-shadow: 0 10px 22px rgba(21, 35, 61, 0.18);
}
.charge-dock span { font-size: 2rem; }
.charge-dock small { font-size: 0.68rem; font-weight: 1000; letter-spacing: 0.08em; }
.dash-slider { --energy: var(--dash-position); --energy-colour: var(--blue); display: block; max-width: 850px; margin: 0 auto; }

/* Bubbles */
.bubble-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  max-width: 680px;
  min-height: 274px;
  margin: 10px auto;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 25px;
  background: color-mix(in srgb, var(--blue) 6%, var(--surface-solid));
}
.bubble {
  position: relative;
  width: min(110px, 18vw);
  aspect-ratio: 1;
  justify-self: center;
  align-self: center;
  border: 4px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: var(--bubble-colour, var(--blue));
  box-shadow: inset -12px -14px 22px rgba(20, 34, 58, 0.15), inset 10px 9px 18px rgba(255, 255, 255, 0.36), 0 10px 18px rgba(29, 61, 105, 0.15);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.bubble::before {
  content: "";
  position: absolute;
  width: 24%;
  height: 16%;
  left: 22%;
  top: 18%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  transform: rotate(-25deg);
}
.bubble:active { transform: scale(0.88); }
.bubble.is-popped { opacity: 0; transform: scale(0.2); pointer-events: none; }
.bubble-one { --bubble-colour: #4b9bec; }
.bubble-two { --bubble-colour: #f1c53e; }
.bubble-three { --bubble-colour: #ec7bab; }
.bubble-four { --bubble-colour: #65bb6b; }
.bubble-five { --bubble-colour: #8d79dc; }
.bubble-six { --bubble-colour: #f69c53; }
.bubble-seven { --bubble-colour: #37b8ad; }
.bubble-eight { --bubble-colour: #73b6ed; transform: scale(0.78); }
.bubble-eight:active { transform: scale(0.68); }
.bubble-eight.is-popped { transform: scale(0.2); }

/* Breathing */
.breathe-zone {
  display: grid;
  place-items: center;
  min-height: 285px;
}
.breathe-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: min(230px, 62vw);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--teal) 24%, var(--surface-solid)) 0 48%, transparent 49%),
    conic-gradient(var(--teal) 0 var(--breath-progress), var(--line) var(--breath-progress) 100%);
  box-shadow: 0 20px 45px rgba(33, 154, 145, 0.2);
  color: var(--ink);
  transform: scale(calc(1 + (var(--breath-number, 0) * 0.0012)));
  transition: transform 0.12s linear;
  user-select: none;
  -webkit-user-select: none;
}
.breathe-orb::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
}
.breathe-orb.is-holding { box-shadow: 0 24px 58px rgba(33, 154, 145, 0.28); }
.breathe-ring {
  position: absolute;
  inset: -13px;
  border: 3px solid color-mix(in srgb, var(--teal) 50%, transparent);
  border-radius: 50%;
  opacity: 0.5;
}
.breathe-orb.is-holding .breathe-ring { animation: breath-ring 2.2s ease-out infinite; }
.breathe-text,
.breathe-orb strong { position: absolute; z-index: 2; }
.breathe-text { transform: translateY(-15px); font-size: 1.02rem; font-weight: 950; }
.breathe-orb strong { transform: translateY(17px); font-size: 1.55rem; }

/* Pattern */
.pattern-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 23px;
  background: var(--surface-solid);
  text-align: center;
}
.pattern-label {
  margin: 4px 0 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pattern-row,
.pattern-options,
.pattern-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 11px;
}
.pattern-row { min-height: 77px; margin-bottom: 21px; }
.pattern-shape,
.pattern-choice,
.pattern-progress-dot {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 19px;
  background: var(--page);
  font-size: 2rem;
}
.pattern-choice {
  min-width: 66px;
  min-height: 66px;
  border: 3px solid var(--line);
  background: var(--surface-solid);
  box-shadow: var(--shadow-small);
}
.pattern-choice:active { transform: scale(0.93); }
.pattern-choice.is-gentle-wrong { animation: gentle-nudge 0.34s ease; }
.pattern-progress { min-height: 30px; margin-top: 18px; }
.pattern-progress-dot {
  width: 22px;
  height: 22px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 0;
}
.pattern-progress-dot.is-done { border-color: var(--green); background: var(--green); }
