/* Little Kids Helper — Phase 1, mobile web */

:root {
  --sky: #CDEBFF;
  --card: #FFFDF7;
  --navy: #2B2D42;
  --button: #FFC93C;
  --button-pressed: #F2A900;
  --star: #FFD23F;
  --star-outline: #FF8C42;
  --coral: #FF6B6B;
  --mint: #6BD6A8;
  --lilac: #B49BFF;
  --font: "Fredoka", "ui-rounded", "Hiragino Maru Gothic ProN", "Chalkboard SE",
    "SF Pro Rounded", "Comic Sans MS", system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  position: fixed;
  inset: 0;
  background: var(--sky);
  color: var(--navy);
  font-family: var(--font);
  font-weight: 600;
}

body {
  /* Stop iOS rubber-band / pull-to-refresh from moving the game */
  overscroll-behavior-y: none;
}

#app {
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  position: relative;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: var(--sky);
}

.screen {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.screen.is-active {
  display: grid;
}

.screen-pose.is-active {
  grid-template-rows: 8fr 55fr 37fr;
}

.screen-home.is-active {
  grid-template-rows: auto 1fr;
}

.screen-letters.is-active {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

/* Zone A — home button (left) + star counter (right, display only) */
.zone-a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px 0;
}

.zone-a--home {
  justify-content: flex-end;
}

.home-button {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--card);
  color: var(--navy);
  box-shadow: 0 4px 0 rgba(43, 45, 66, 0.08), 0 8px 20px rgba(43, 45, 66, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
}

.home-button svg {
  width: 32px;
  height: 32px;
  display: block;
}

.home-button:is(:active, .is-pressed) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(43, 45, 66, 0.08), 0 4px 10px rgba(43, 45, 66, 0.1);
}

.home-button:focus {
  outline: none;
}

.home-button:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

.star-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 4px 18px 4px 10px;
  background: var(--card);
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(43, 45, 66, 0.08), 0 8px 20px rgba(43, 45, 66, 0.08);
  transform-origin: center;
}

.counter-star {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 0 rgba(255, 140, 66, 0.35));
}

.star-count {
  font-size: 42px; /* 32pt */
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  min-width: 0.7em;
  text-align: right;
}

.star-counter.is-pulse {
  animation: counter-pulse 420ms cubic-bezier(0.34, 1.5, 0.64, 1);
}

@keyframes counter-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18);
  }
}

/* Zone B — pose card */
.zone-b {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 8px 24px;
  min-height: 0;
}

.pose-card {
  width: 100%;
  max-width: 600px;
  height: 100%;
  background: var(--card);
  border-radius: 32px;
  box-shadow: 0 8px 0 rgba(43, 45, 66, 0.06), 0 18px 32px rgba(43, 45, 66, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px 16px 20px;
}

.pose-visual {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.pose-visual.is-enter {
  animation: pose-bounce-in 520ms cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.pose-visual.is-leave {
  animation: pose-slide-out 200ms ease-in forwards;
}

.pose-visual.is-slide-in {
  animation: pose-slide-in 300ms cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

@keyframes pose-bounce-in {
  0% {
    transform: translateY(12px) scale(0.92);
    opacity: 0;
  }
  60% {
    transform: translateY(-6px) scale(1.03);
    opacity: 1;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

@keyframes pose-slide-out {
  to {
    transform: translateX(-48px);
    opacity: 0;
  }
}

@keyframes pose-slide-in {
  0% {
    transform: translateX(48px) scale(0.96);
    opacity: 0;
  }
  70% {
    transform: translateX(-6px) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

.pose-figure {
  flex: 1 1 0;
  width: 100%;
  max-width: 420px;
  min-height: 0;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
}

.pose-name {
  flex: 0 0 auto;
  margin: 4px 8px 0;
  padding: 0;
  font-size: 48px; /* 36pt */
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  letter-spacing: -0.02em;
}

/* Zone C — big reward button in the bottom third */
.zone-c {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px calc(20px + var(--safe-bottom));
  /* padding already includes safe area on #app; keep a little extra thumb room */
  padding-bottom: 20px;
}

.did-it-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 600px;
  min-height: 96px;
  height: 96px;
  max-height: 120px;
  margin: 0;
  padding: 0 24px;
  border: none;
  border-radius: 48px;
  background: var(--button);
  color: var(--navy);
  font-family: inherit;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 7px 0 #e0a80a, 0 12px 24px rgba(43, 45, 66, 0.16);
  touch-action: manipulation;
}

.did-it-button:is(:active, .is-pressed):not(:disabled) {
  background: var(--button-pressed);
  box-shadow: 0 2px 0 #c78e00, 0 4px 12px rgba(43, 45, 66, 0.14);
  transform: translateY(5px);
}

.did-it-button:disabled {
  cursor: default;
  /* Stay bright during the celebration so it doesn't feel "broken" */
  opacity: 0.9;
}

.did-it-button:focus {
  outline: none;
}

.did-it-button:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 4px;
}

.did-it-star {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

/* Reward FX overlay */
#fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  overflow: hidden;
}

.flying-star {
  position: fixed;
  width: 88px;
  height: 88px;
  margin: 0;
  transform: translate(-50%, -50%);
  transform-origin: center;
  z-index: 50;
  filter: drop-shadow(0 6px 10px rgba(43, 45, 66, 0.25));
  will-change: transform, opacity;
}

.flying-star svg {
  width: 100%;
  height: 100%;
  display: block;
}

.confetti-piece {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 3px;
  z-index: 45;
  will-change: transform, opacity;
}

/* Landscape / too-short hint (phones tipped sideways) */
#rotate-hint {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sky);
  color: var(--navy);
  text-align: center;
  padding: 24px;
  font-size: 28px;
  font-weight: 700;
}

#rotate-hint[hidden] {
  display: none;
}

#rotate-hint p {
  margin: 0;
  max-width: 16ch;
}

/* Short phones: keep the name readable but don't overflow */
@media (max-height: 640px) {
  .pose-name {
    font-size: 36px;
  }
  .star-count {
    font-size: 36px;
  }
  .did-it-button {
    font-size: 34px;
  }
}

/* Reduced motion: no fly-to-counter, no slide, just a pulse + fade */
@media (prefers-reduced-motion: reduce) {
  .pose-visual.is-enter,
  .pose-visual.is-leave,
  .pose-visual.is-slide-in,
  .star-counter.is-pulse {
    animation: fade-swap 280ms ease both;
  }

  .star-counter.is-pulse {
    animation: reduced-pulse 320ms ease;
  }
}

@keyframes fade-swap {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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


/* ------------------------------------------------------------------ */
/* Home screen                                                          */
/* ------------------------------------------------------------------ */

.home-tiles {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 12px 24px 28px;
  min-height: 0;
}

.home-tile {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  max-width: 320px;
  flex: 1 1 0;
  min-height: 0;
  max-height: 320px;
  aspect-ratio: 1;
  margin: 0;
  padding: 16px;
  border: none;
  border-radius: 32px;
  background: var(--card);
  box-shadow: 0 8px 0 rgba(43, 45, 66, 0.06), 0 18px 32px rgba(43, 45, 66, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.home-tile:is(:active, .is-pressed) {
  transform: translateY(4px);
  box-shadow: 0 4px 0 rgba(43, 45, 66, 0.06), 0 8px 16px rgba(43, 45, 66, 0.1);
}

.home-tile:focus {
  outline: none;
}

.home-tile:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 4px;
}

.home-tile-art--pose { object-fit: contain; }

.home-tile-art {
  width: 80%;
  height: 80%;
  max-width: 220px;
  max-height: 220px;
  display: block;
}

/* ------------------------------------------------------------------ */
/* Letter Fill                                                          */
/* ------------------------------------------------------------------ */

.letter-tiles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px 8px;
  min-height: 108px;
}

.letter-tile {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  min-width: 88px;
  min-height: 88px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 22px;
  background: var(--button);
  color: var(--navy);
  font-family: inherit;
  font-size: 64px; /* 48pt */
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  cursor: pointer;
  box-shadow: 0 6px 0 #e0a80a, 0 10px 18px rgba(43, 45, 66, 0.14);
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.letter-tile:is(:active, .is-pressed):not(:disabled) {
  background: var(--button-pressed);
  box-shadow: 0 2px 0 #c78e00, 0 4px 10px rgba(43, 45, 66, 0.12);
  transform: translateY(4px);
}

.letter-tile:disabled {
  cursor: default;
}

.letter-tile.is-dimmed {
  opacity: 0.4;
  box-shadow: 0 4px 0 #e0a80a;
  transform: none;
}

.letter-tile.is-hint {
  animation: hint-bounce 800ms ease-in-out infinite;
  box-shadow: 0 0 0 5px rgba(255, 210, 63, 0.95), 0 6px 0 #e0a80a, 0 10px 18px rgba(43, 45, 66, 0.14);
}

.letter-tile.is-drop {
  animation: tile-drop 360ms cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.letter-tile:focus {
  outline: none;
}

.letter-tile:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

@keyframes hint-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes tile-drop {
  from { transform: translateY(-24px) scale(0.9); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* On narrow phones, 4×88px tiles plus 16px gaps are slightly wider than
   the screen. Use a 4-column grid and let the tiles shrink as equal squares
   so height never collapses (a % height was the previous bug). */
@media (max-width: 430px) {
  .letter-tiles[data-count="4"] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 88px));
    justify-content: center;
    gap: 16px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .letter-tiles[data-count="4"] .letter-tile {
    flex: unset;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    min-width: 0;
    min-height: 0;
    max-width: 88px;
    font-size: 56px;
    justify-self: stretch;
  }
}

.picture-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  min-height: 0;
}

.picture-card {
  width: 100%;
  max-width: 600px;
  height: 100%;
  max-height: 32vh;
  background: var(--card);
  border-radius: 32px;
  box-shadow: 0 8px 0 rgba(43, 45, 66, 0.06), 0 18px 32px rgba(43, 45, 66, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
  pointer-events: none; /* reserved for read-aloud later */
}

.picture-card.is-enter {
  animation: pose-bounce-in 520ms cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.word-picture {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.word-slots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 20px 28px;
}

.word-slots.is-enter {
  animation: slots-up 420ms cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

@keyframes slots-up {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.word-slot {
  flex: 0 0 auto;
  width: 72px;
  min-width: 72px;
  height: 88px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 4px 0 rgba(43, 45, 66, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}

.word-slot.is-filled {
  border: 3px solid rgba(43, 45, 66, 0.12);
}

.word-slot.is-blank {
  background: transparent;
  border: 4px dashed #FFC93C;
  box-shadow: none;
  animation: blank-pulse 1.4s ease-in-out infinite;
}

.word-slot.is-wrong {
  animation: none;
  border: 4px solid #FF6B6B;
  background: rgba(255, 107, 107, 0.12);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.25);
}

.word-slot.is-snap {
  animation: slot-snap 400ms cubic-bezier(0.34, 1.5, 0.64, 1);
}

.word-slots.is-correct .word-slot {
  background: #E8FFF4;
  border: 3px solid #6BD6A8;
  box-shadow: 0 0 0 4px rgba(107, 214, 168, 0.35);
}

.slot-letter {
  font-size: 75px; /* 56pt */
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.word-slot.is-blank .slot-letter:empty {
  display: none;
}

@keyframes blank-pulse {
  0%, 100% { border-color: #FFC93C; transform: scale(1); }
  50% { border-color: #F2A900; transform: scale(1.04); }
}

@keyframes slot-snap {
  0% { transform: scale(0.86); }
  55% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.flying-letter {
  pointer-events: none;
  border-radius: 22px;
}

.flying-letter.is-shake {
  animation: letter-shake 150ms ease-in-out;
}

@keyframes letter-shake {
  0%, 100% { translate: 0 0; }
  25% { translate: -8px 0; }
  75% { translate: 8px 0; }
}

.flying-star--shower {
  width: 72px;
  height: 72px;
}

@media (max-height: 640px) {
  .letter-tile {
    font-size: 52px;
  }
  .slot-letter {
    font-size: 60px;
  }
  .picture-card {
    max-height: 28vh;
  }
  .word-slot {
    height: 76px;
  }
  .home-button {
    width: 64px;
    height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .letter-tile.is-drop,
  .letter-tile.is-hint,
  .picture-card.is-enter,
  .word-slots.is-enter,
  .word-slot.is-blank,
  .word-slot.is-snap,
  .flying-letter.is-shake {
    animation: none;
  }
  .letter-tile.is-hint {
    box-shadow: 0 0 0 5px rgba(255, 210, 63, 0.95), 0 6px 0 #e0a80a;
  }
}

/* ------------------------------------------------------------------ */
/* Letter Fill: level picker (Level 1 / Level 2)                        */
/* ------------------------------------------------------------------ */

.level-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.level-button {
  appearance: none;
  -webkit-appearance: none;
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  padding: 0;
  margin: 0;
  border: 3px solid transparent;
  border-radius: 18px;
  background: var(--card);
  color: var(--navy);
  font-family: inherit;
  box-shadow: 0 2px 0 rgba(43, 45, 66, 0.08);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.level-num {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.level-dots {
  display: inline-flex;
  gap: 5px;
}

.level-dots i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--navy);
}

.level-button.is-active {
  background: var(--button);
  border-color: var(--navy);
  transform: translateY(-3px);
  box-shadow: 0 5px 0 #e0a80a, 0 8px 16px rgba(43, 45, 66, 0.14);
}

.level-button:not(.is-active):active {
  transform: translateY(2px);
}

.level-button:focus {
  outline: none;
}

.level-button:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

/* Narrow phones: home + two level buttons + star counter must share 360 px. */
@media (max-width: 420px) {
  .screen-letters .zone-a {
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .screen-letters .star-counter {
    gap: 4px;
    padding: 4px 12px 4px 8px;
    min-width: 0;
  }
  .screen-letters .counter-star {
    width: 28px;
    height: 28px;
  }
  .screen-letters .star-count {
    font-size: clamp(26px, 8.4vw, 42px);
  }
}

/* ------------------------------------------------------------------ */
/* Letter Fill Level 2: longer words, team / digraph tiles             */
/* ------------------------------------------------------------------ */

.letter-tile--team {
  font-size: 50px;
  letter-spacing: -0.04em;
}

@media (max-width: 430px) {
  .letter-tiles[data-count="4"] .letter-tile--team {
    font-size: 40px;
  }
}

.word-slots[data-level="2"] {
  gap: 8px;
  padding-left: 10px;
  padding-right: 10px;
}

.word-slots[data-level="2"] .word-slot {
  width: 60px;
  min-width: 52px;
  height: 84px;
}

.word-slots[data-level="2"] .word-slot.is-team {
  width: 92px;
  min-width: 84px;
}

.word-slots[data-level="2"] .slot-letter {
  font-size: 60px;
}

.word-slots[data-level="2"] .word-slot.is-team .slot-letter {
  font-size: 52px;
  letter-spacing: -0.04em;
}

/* Tap the picture to hear the word (Level 2 only). */
.screen-letters[data-level="2"] .picture-card {
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.picture-card.is-speaking {
  animation: picture-hear 380ms cubic-bezier(0.34, 1.45, 0.64, 1);
}

@keyframes picture-hear {
  0% { transform: scale(1); }
  45% { transform: scale(0.96); }
  100% { transform: scale(1); }
}

@media (max-height: 640px) {
  .word-slots[data-level="2"] .word-slot {
    height: 74px;
  }
  .word-slots[data-level="2"] .slot-letter {
    font-size: 50px;
  }
  .word-slots[data-level="2"] .word-slot.is-team .slot-letter {
    font-size: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .picture-card.is-speaking,
  .level-button {
    animation: none;
    transition: none;
  }
}

/* ------------------------------------------------------------------ */
/* Pose game microphone: "say I did it"                                */
/* ------------------------------------------------------------------ */

.mic-button {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 4px 0 rgba(43, 45, 66, 0.08), 0 8px 20px rgba(43, 45, 66, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 200ms ease, opacity 200ms ease;
}

.mic-button[hidden] {
  display: none;
}

.mic-icon {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  display: block;
}

.mic-slash {
  display: none;
}

.mic-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

/* Listening: warm yellow with a gentle breathing ring. */
.mic-button[data-state="listening"] {
  background: var(--button);
}

.mic-button[data-state="listening"] .mic-ring {
  box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.55);
  opacity: 1;
  animation: mic-breathe 1.6s ease-out infinite;
}

/* On, but paused while the phone talks or the star flies. */
.mic-button[data-state="waiting"] {
  background: var(--sky);
  opacity: 0.85;
}

/* Off, or the browser said no: white with a soft coral slash. */
.mic-button[data-state="off"] .mic-slash,
.mic-button[data-state="blocked"] .mic-slash {
  display: inline;
}

.mic-button[data-state="off"] .mic-icon,
.mic-button[data-state="blocked"] .mic-icon {
  opacity: 0.8;
}

.mic-button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(43, 45, 66, 0.08), 0 4px 10px rgba(43, 45, 66, 0.1);
}

.mic-button:focus {
  outline: none;
}

.mic-button:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

@keyframes mic-breathe {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.6);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(255, 201, 60, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 201, 60, 0);
  }
}

@media (max-width: 420px) {
  .screen-pose .zone-a {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .mic-button {
    width: 52px;
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mic-button[data-state="listening"] .mic-ring {
    animation: none;
    box-shadow: 0 0 0 4px rgba(255, 201, 60, 0.45);
  }
}
