:root {
  color-scheme: dark;
  --night: #071527;
  --ink: #10213a;
  --panel: #112944;
  --panel-2: #183554;
  --milk: #f7fbff;
  --muted: #9eb6cf;
  --mint: #4ce0b3;
  --mango: #ffc454;
  --coral: #ff6f73;
  --violet: #8379ff;
  --cyan: #64d7ff;
  --line: rgba(220, 239, 255, .13);
  --shadow: rgba(0, 7, 18, .42);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  background: var(--night);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overscroll-behavior-y: none; }
body {
  min-height: 100svh;
  color: var(--milk);
  background:
    radial-gradient(circle at 9% 7%, rgba(131, 121, 255, .19), transparent 23rem),
    radial-gradient(circle at 100% 31%, rgba(76, 224, 179, .1), transparent 22rem),
    var(--night);
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: min(100%, 560px);
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 16px) 17px calc(env(safe-area-inset-bottom) + 112px);
}

.topbar, .section-heading, .meter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar { align-items: flex-start; }
.eyebrow {
  margin: 0 0 5px;
  color: var(--mint);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2 {
  margin: 0;
  font-family: "Arial Rounded MT Bold", "SF Pro Rounded", "PingFang SC", sans-serif;
  letter-spacing: -.035em;
}
h1 { font-size: clamp(25px, 7.5vw, 37px); line-height: 1; }
h2 { font-size: 20px; }

.connection {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(7, 21, 39, .72);
  font-size: 11px;
  font-weight: 800;
}
.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mango);
  box-shadow: 0 0 0 4px rgba(255, 196, 84, .12);
}
.connection[data-state="online"] .connection-dot { background: var(--mint); box-shadow: 0 0 0 4px rgba(76, 224, 179, .13); }
.connection[data-state="offline"] .connection-dot { background: var(--coral); }

.robot-stage {
  position: relative;
  height: clamp(275px, 69vw, 340px);
  margin: 20px 0 12px;
  overflow: hidden;
  border: 1px solid rgba(100, 215, 255, .3);
  border-radius: 34px;
  background: linear-gradient(145deg, #123862, #0d2746 58%, #11233b);
  box-shadow: inset 0 0 0 7px rgba(7, 21, 39, .27), 0 24px 60px var(--shadow);
  isolation: isolate;
}
.robot-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 270px;
  height: 270px;
  left: 50%;
  top: 49%;
  border: 1px solid rgba(76, 224, 179, .25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 24px rgba(100, 215, 255, .035), 0 0 0 58px rgba(131, 121, 255, .035);
}
.stage-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 29px 29px;
  transform: perspective(260px) rotateX(56deg) scale(1.45) translateY(44%);
}
.online-pill {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(7, 21, 39, .72);
  font-size: 11px;
  font-weight: 750;
}
.online-pill span { color: var(--mint); margin-right: 3px; }
.online-pill strong { color: var(--milk); }

.robot {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 170px;
  height: 148px;
  transform: translate(-50%, -50%);
  transform-origin: 50% 80%;
}
.antenna {
  position: absolute;
  width: 6px;
  height: 25px;
  left: 82px;
  top: -18px;
  border-radius: 4px;
  background: var(--mint);
}
.antenna::before {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  left: -4.5px;
  top: -8px;
  border-radius: 50%;
  background: var(--mango);
  box-shadow: 0 0 0 7px rgba(255, 196, 84, .12);
}
.robot-face {
  position: absolute;
  inset: 0 0 18px;
  border: 7px solid var(--milk);
  border-radius: 54px 54px 45px 45px;
  background: var(--ink);
  box-shadow: 0 12px 0 #071527, 0 18px 30px rgba(0, 0, 0, .28);
}
.eye {
  position: absolute;
  width: 23px;
  height: 31px;
  top: 33px;
  border-radius: 50%;
  background: var(--milk);
}
.eye-left { left: 34px; transform: rotate(-8deg); }
.eye-right { right: 34px; transform: rotate(8deg); }
.cheek {
  position: absolute;
  width: 17px;
  height: 7px;
  top: 73px;
  border-radius: 50%;
  background: var(--coral);
  opacity: .72;
}
.cheek-left { left: 24px; transform: rotate(8deg); }
.cheek-right { right: 24px; transform: rotate(-8deg); }
.mouth-target {
  position: absolute;
  width: 49px;
  height: 22px;
  left: 50%;
  bottom: 16px;
  border: 5px solid var(--milk);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: width .16s ease, height .16s ease, border-color .16s ease;
}
.robot-foot {
  position: absolute;
  width: 42px;
  height: 22px;
  bottom: 0;
  border-radius: 50%;
  background: var(--violet);
}
.foot-left { left: 24px; transform: rotate(-7deg); }
.foot-right { right: 24px; transform: rotate(7deg); }
.stage-prompt {
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: max-content;
  max-width: calc(100% - 28px);
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
}
.robot-stage.is-eating .mouth-target { animation: mouth-chew .24s ease-in-out 8 alternate; }
.robot-stage.is-eating .robot { animation: robot-chew .24s ease-in-out 8 alternate; }
.robot-stage.is-pet .robot { animation: robot-nod .32s ease-in-out 3; }
.robot-stage.is-pet .eye { height: 9px; top: 51px; border-radius: 999px; }
.robot-stage.is-pet .cheek { width: 24px; height: 10px; opacity: 1; }
.robot-stage.is-pet .mouth-target { width: 35px; height: 16px; border-top-color: transparent; }
.robot-stage.is-tickle .robot { animation: robot-tickle .14s ease-in-out 10 alternate; }
.robot-stage.is-tickle .eye { height: 10px; top: 49px; border-radius: 999px; }
.robot-stage.is-tickle .mouth-target { width: 58px; height: 34px; border-color: var(--mango); }
.robot-stage.is-gift .robot { animation: robot-gift .5s cubic-bezier(.2,.85,.2,1) 2 alternate; }
.robot-stage.is-expression .robot-face { animation: expression-glow .55s ease-in-out 3 alternate; }
.robot-stage.is-speaking .mouth-target { animation: mouth-speak .19s ease-in-out infinite alternate; }
.robot-stage.is-speaking .antenna::before { animation: speaking-signal .48s ease-in-out infinite alternate; }

.flight-food {
  position: fixed;
  z-index: 120;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  margin: -35px 0 0 -35px;
  border: 2px solid rgba(255,255,255,.75);
  border-radius: 24px;
  background: rgba(247, 251, 255, .96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .35), 0 0 0 8px rgba(100, 215, 255, .08);
  font-size: 43px;
  pointer-events: none;
  will-change: transform, left, top, opacity;
}
.flight-spark {
  position: fixed;
  z-index: 119;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mango);
  pointer-events: none;
}

.shared-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 24px; }
.meter-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--panel);
}
.meter-heading span { color: var(--muted); font-size: 11px; font-weight: 800; }
.meter-heading strong { font-size: 19px; }
.fullness-card .meter-heading strong { color: var(--mint); }
.spicy-card .meter-heading strong { color: var(--coral); }
.meter-track, .unlock-track {
  height: 9px;
  margin: 10px 0 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #28415d;
}
.meter-track i, .unlock-track i { display: block; width: 0; height: 100%; border-radius: inherit; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.fullness-card .meter-track i { background: linear-gradient(90deg, #38cda1, #77f0cb); }
.spicy-card .meter-track i { background: linear-gradient(90deg, #ffb451, #ff6670); }
.meter-card small { color: var(--muted); font-size: 9px; }

.action-panel, .message-panel, .pantry, .gift-panel, .collection-card, .activity-card {
  margin-top: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 27px;
  background: rgba(17, 41, 68, .91);
  box-shadow: 0 13px 30px rgba(0,0,0,.12);
}
.section-heading { align-items: end; margin-bottom: 14px; }
.player-name, .tap-hint {
  max-width: 42%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-button {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 0;
  border-radius: 21px;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 6px 0 rgba(4, 12, 24, .35);
  transition: transform .12s, box-shadow .12s;
}
.pet-action { background: linear-gradient(145deg, #74e7c5, #40cda4); }
.tickle-action { background: linear-gradient(145deg, #ffe08d, #ffc454); }
.action-icon { flex: 0 0 auto; font-size: 30px; }
.action-button strong, .action-button small { display: block; }
.action-button strong { font-family: "Arial Rounded MT Bold", "PingFang SC", sans-serif; font-size: 15px; }
.action-button small { margin-top: 4px; color: rgba(16,33,58,.68); font-size: 9px; font-weight: 700; }

.message-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(100, 215, 255, .38);
  background:
    radial-gradient(circle at 100% 0, rgba(100, 215, 255, .15), transparent 12rem),
    linear-gradient(145deg, rgba(131, 121, 255, .13), rgba(17, 41, 68, .97) 52%);
}
.message-panel::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 1px;
  right: -35px;
  top: 72px;
  background: linear-gradient(90deg, transparent, rgba(100,215,255,.5), transparent);
  transform: rotate(-11deg);
  pointer-events: none;
}
.message-heading { position: relative; z-index: 1; align-items: center; }
.message-live {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 7px 10px;
  border: 1px solid rgba(100,215,255,.2);
  border-radius: 12px;
  background: rgba(7,21,39,.54);
}
.message-live i, .message-send-icon i {
  display: block;
  width: 3px;
  border-radius: 999px;
  background: var(--cyan);
  animation: sound-bar .8s ease-in-out infinite alternate;
}
.message-live i { height: 9px; }
.message-live i:nth-child(2), .message-live i:nth-child(4) { height: 18px; animation-delay: -.45s; }
.message-live i:nth-child(3) { height: 13px; animation-delay: -.2s; }
.message-live i:nth-child(5) { animation-delay: -.62s; }
.message-form { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 126px; gap: 9px; }
.message-field { position: relative; min-width: 0; }
.message-field textarea {
  width: 100%;
  min-height: 78px;
  display: block;
  resize: none;
  padding: 13px 45px 13px 14px;
  border: 2px solid #385575;
  border-radius: 18px;
  outline: 0;
  color: var(--milk);
  background: rgba(7, 21, 39, .83);
  font-size: 16px;
  line-height: 1.45;
  transition: border-color .18s, box-shadow .18s;
}
.message-field textarea::placeholder { color: #6f89a4; }
.message-field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(100,215,255,.09); }
.message-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #6f89a4;
  font-size: 9px;
  font-weight: 800;
}
.message-count strong { color: var(--cyan); }
.message-count.is-near-limit strong { color: var(--mango); }
.message-send {
  min-height: 78px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 10px;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: linear-gradient(145deg, #78e4ff, #4ce0b3);
  box-shadow: 0 5px 0 rgba(4,12,24,.36), 0 0 26px rgba(100,215,255,.09);
  transition: transform .12s, box-shadow .12s, opacity .18s;
}
.message-send:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(4,12,24,.3); }
.message-send strong { font-size: 11px; }
.message-send-icon { height: 17px; display: flex; align-items: center; justify-content: center; gap: 3px; }
.message-send-icon i { height: 8px; background: var(--ink); animation-duration: .65s; }
.message-send-icon i:nth-child(2) { height: 17px; animation-delay: -.3s; }
.message-send-icon i:nth-child(3) { height: 12px; animation-delay: -.52s; }
.message-note { margin: 10px 3px 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.family-gateway {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.family-gateway > div { position: relative; z-index: 1; }
.family-gateway p:last-child { max-width: 310px; margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.family-gateway > a {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 116px;
  min-height: 70px;
  padding: 10px;
  border-radius: 18px;
  color: var(--ink);
  background: var(--mint);
  box-shadow: 0 7px 0 #17997a, 0 14px 28px rgba(76, 224, 179, .13);
  text-decoration: none;
}
.family-gateway > a span { font-size: 20px; }
.family-gateway > a strong { font-size: 10px; }

.food-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.swipe-guide {
  --swipe-progress: 0%;
  position: relative;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 9px;
  margin: -2px 0 13px;
  padding: 9px 12px 11px;
  overflow: hidden;
  border: 1px solid rgba(100,215,255,.22);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(100,215,255,.1), rgba(76,224,179,.06));
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.swipe-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  color: var(--cyan);
  background: #132f4c;
  box-shadow: inset 0 -4px 0 rgba(4,12,24,.25);
  font-size: 25px;
  font-weight: 900;
  transition: transform .18s, color .18s, background .18s;
}
.swipe-copy strong, .swipe-copy small { display: block; }
.swipe-copy strong { color: var(--milk); font-size: 11px; }
.swipe-copy small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.swipe-meter {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255,255,255,.05);
}
.swipe-meter i {
  display: block;
  width: var(--swipe-progress);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--mint));
  box-shadow: 0 0 12px rgba(76,224,179,.5);
}
.swipe-guide.is-tracking { border-color: rgba(100,215,255,.55); background: rgba(100,215,255,.13); }
.swipe-guide.is-ready { border-color: var(--mint); background: rgba(76,224,179,.15); box-shadow: 0 0 25px rgba(76,224,179,.12); }
.swipe-guide.is-ready .swipe-arrow { color: var(--ink); background: var(--mint); transform: translateY(-3px); }
.food-card {
  min-width: 0;
  min-height: 82px;
  padding: 10px 3px 8px;
  border: 0;
  border-radius: 17px;
  color: var(--ink);
  background: var(--milk);
  box-shadow: 0 5px 0 rgba(4, 12, 24, .34);
  transition: transform .12s, box-shadow .12s;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.food-card.apple { background: #ff9396; }
.food-card.cake { background: #ffd580; }
.food-card.burger { background: #ffb46f; }
.food-card.carrot { background: #86e8c7; }
.food-card.lemon { background: #ffe978; }
.food-card.chili { background: #ff7d81; }
.food-emoji { display: block; margin-bottom: 7px; font-size: clamp(28px, 8vw, 39px); line-height: 1; filter: drop-shadow(0 3px 2px rgba(16,33,58,.14)); }
.food-card > span:last-child { display: block; overflow: hidden; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.food-card.is-dragging { transform: translateY(3px) scale(.95); box-shadow: 0 1px 0 rgba(4,12,24,.3); cursor: grabbing; }
.food-card.is-dragging .food-emoji { opacity: .18; }
.swipe-food-follower {
  z-index: 240;
  border-color: rgba(255,255,255,.88);
  box-shadow: 0 22px 55px rgba(0,0,0,.48), 0 0 0 8px rgba(100,215,255,.1);
  transform: rotate(var(--drag-tilt, 0deg)) scale(var(--drag-scale, 1));
  transition: border-color .14s, box-shadow .14s;
}
.swipe-food-follower.is-ready {
  border-color: var(--mint);
  box-shadow: 0 24px 65px rgba(0,0,0,.5), 0 0 0 10px rgba(76,224,179,.18), 0 0 32px rgba(76,224,179,.42);
}
body.is-dragging-food { overscroll-behavior: none; }

.gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.gift-grid button {
  min-height: 76px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 19px;
  color: var(--milk);
  background: var(--panel-2);
  font-size: 11px;
  font-weight: 800;
  transition: transform .12s, background .12s;
}
.gift-grid button span { display: block; margin-bottom: 6px; font-size: 30px; }

.action-button:active, .food-card:not(.is-dragging):active, .gift-grid button:active, .expression-token.is-unlocked:active { transform: translateY(4px) scale(.97); box-shadow: 0 1px 0 rgba(4,12,24,.32); }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
button:disabled { opacity: .58; }

.collection-card {
  border: 1px solid rgba(131, 121, 255, .42);
  background:
    radial-gradient(circle at 88% 3%, rgba(255,196,84,.1), transparent 11rem),
    linear-gradient(145deg, rgba(131,121,255,.18), rgba(17,41,68,.97) 44%);
}
.collection-heading { align-items: center; }
.collection-count {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(100,215,255,.2);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(7,21,39,.55);
  font-size: 10px;
  font-weight: 800;
}
.collection-count strong { color: var(--mango); font-size: 16px; }
.next-unlock {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px;
  background: rgba(7,21,39,.48);
}
.next-unlock.is-complete { border-color: rgba(76,224,179,.28); }
.unlock-kicker { margin: 0 0 3px; color: var(--muted); font-size: 9px; font-weight: 800; }
.unlock-copy h3 {
  margin: 0;
  font-family: "Arial Rounded MT Bold", "SF Pro Rounded", "PingFang SC", sans-serif;
  font-size: 16px;
  letter-spacing: -.025em;
}
.unlock-orb {
  flex: 0 0 auto;
  width: 57px;
  height: 57px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--mango);
  background: #202e5b;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 0 30px rgba(131,121,255,.23);
  font-size: 25px;
}
.next-unlock.is-complete .unlock-orb { color: var(--ink); background: var(--mint); box-shadow: 0 0 28px rgba(76,224,179,.22); }
.unlock-copy { min-width: 0; flex: 1; }
.unlock-track { margin: 9px 0 6px; }
.unlock-track i { background: linear-gradient(90deg, var(--violet), var(--mango)); }
.next-unlock.is-complete .unlock-track i { background: var(--mint); }
.unlock-copy small { color: var(--muted); font-size: 10px; }

.expression-shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 12px; }
.expression-token {
  position: relative;
  min-width: 0;
  min-height: 88px;
  overflow: hidden;
  padding: 7px 4px 8px;
  border: 1px solid rgba(100,215,255,.15);
  border-radius: 18px;
  color: var(--milk);
  background: #091725;
  box-shadow: inset 0 0 0 4px rgba(24,53,84,.48), 0 5px 0 rgba(4,12,24,.32);
  transition: transform .12s, border-color .18s, box-shadow .18s;
}
.expression-token::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .2;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(100,215,255,.12) 3px 4px);
  pointer-events: none;
}
.expression-token > * { position: relative; z-index: 1; display: block; }
.expression-face {
  width: 100%;
  height: 38px;
  display: grid;
  place-items: center;
  object-fit: contain;
  image-rendering: pixelated;
  color: var(--cyan);
  font-family: "SF Mono", "Menlo", monospace;
  font-size: clamp(16px, 5vw, 23px);
  font-weight: 900;
  letter-spacing: -.12em;
  text-shadow: 0 0 10px rgba(100,215,255,.42);
}
.expression-token strong { margin-top: 2px; font-size: 9px; white-space: nowrap; }
.expression-token small { margin-top: 3px; color: var(--muted); font-size: 7px; font-weight: 750; }
.expression-token.is-unlocked { cursor: pointer; }
.expression-token.is-unlocked:focus-visible { border-color: var(--mint); }
.expression-token.is-locked {
  border-style: dashed;
  color: #6f87a0;
  background: rgba(7,21,39,.48);
  box-shadow: inset 0 0 0 4px rgba(24,53,84,.22);
}
.expression-token.is-locked .expression-face { color: #526a82; text-shadow: none; letter-spacing: .08em; }
.expression-token:disabled { opacity: 1; }
.expression-token.just-unlocked { animation: collection-reveal .72s cubic-bezier(.18,.85,.2,1); border-color: var(--mango); }
.collection-hint { margin: 11px 3px 0; color: var(--muted); font-size: 9px; line-height: 1.45; text-align: center; }

.activity-card .section-heading { align-items: center; }
.live-tag { padding: 5px 7px; border-radius: 7px; color: var(--ink); background: var(--coral); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.activity-card ol { margin: 0; padding: 0; list-style: none; }
.activity-card li {
  position: relative;
  padding: 10px 0 10px 18px;
  border-top: 1px solid rgba(255,255,255,.07);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.activity-card li::before { content: ""; position: absolute; left: 1px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.group-note { margin: 18px 14px 0; color: #6f89a4; font-size: 9px; line-height: 1.6; text-align: center; }

.pair-dialog {
  width: min(calc(100% - 30px), 420px);
  padding: 0;
  border: 1px solid rgba(131, 121, 255, .45);
  border-radius: 29px;
  color: var(--milk);
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0,0,0,.58);
}
.pair-dialog::backdrop { background: rgba(3, 9, 18, .84); backdrop-filter: blur(10px); }
.pair-dialog form { padding: 26px; }
.pair-dialog h2 { font-size: 27px; }
.pair-dialog p:not(.eyebrow):not(.pair-error) { color: var(--muted); font-size: 13px; line-height: 1.55; }
.pair-robot { width: 72px; height: 57px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 21px; color: var(--ink); background: var(--mint); font-size: 24px; font-weight: 900; }
.pair-dialog label { display: block; margin: 15px 0 7px; color: var(--muted); font-size: 11px; font-weight: 800; }
.pair-dialog input { width: 100%; padding: 13px 14px; border: 2px solid #385575; border-radius: 15px; color: var(--milk); background: var(--night); font-size: 16px; }
.pair-dialog .pin-input { font-size: 25px; font-weight: 850; letter-spacing: .3em; text-align: center; }
.pair-dialog input:focus { border-color: var(--mint); outline: 0; }
.pair-error { min-height: 20px; margin: 8px 0; color: #ff9a9e; font-size: 11px; font-weight: 750; }
.pair-button { width: 100%; padding: 14px; border: 0; border-radius: 15px; color: var(--ink); background: var(--mint); font-weight: 900; }

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 91px);
  max-width: calc(100% - 34px);
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--milk);
  box-shadow: 0 14px 40px rgba(0,0,0,.38);
  font-size: 12px;
  font-weight: 850;
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.app-nav {
  position: fixed;
  z-index: 180;
  right: max(13px, calc((100vw - 560px) / 2 + 13px));
  bottom: calc(env(safe-area-inset-bottom) + 11px);
  left: max(13px, calc((100vw - 560px) / 2 + 13px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 7px;
  border: 1px solid rgba(220,239,255,.18);
  border-radius: 23px;
  background: rgba(8,24,41,.91);
  box-shadow: 0 18px 55px rgba(0,0,0,.5);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.app-nav a {
  min-height: 52px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border-radius: 17px;
  color: #7893aa;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}
.app-nav a.is-active { color: var(--ink); background: var(--mint); box-shadow: 0 8px 20px rgba(76,224,179,.16); }
.app-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@keyframes robot-chew { to { transform: translate(-50%, -50%) rotate(2deg) scale(1.035); } }
@keyframes mouth-chew { to { width: 61px; height: 10px; } }
@keyframes robot-nod { 50% { transform: translate(-50%, -45%) rotate(0); } }
@keyframes robot-tickle { to { transform: translate(-50%, -50%) rotate(7deg); } }
@keyframes robot-gift { to { transform: translate(-50%, -57%) scale(1.07); } }
@keyframes expression-glow { to { border-color: var(--mint); box-shadow: 0 12px 0 #071527, 0 0 34px rgba(76,224,179,.34); } }
@keyframes mouth-speak { to { width: 34px; height: 31px; border-color: var(--cyan); } }
@keyframes speaking-signal { to { box-shadow: 0 0 0 10px rgba(100,215,255,.13), 0 0 25px rgba(100,215,255,.42); } }
@keyframes sound-bar { to { transform: scaleY(.48); opacity: .58; } }
@keyframes collection-reveal {
  0% { transform: scale(.72) rotate(-3deg); opacity: .25; }
  58% { transform: scale(1.06) rotate(1deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@media (max-width: 420px) {
  .food-grid { grid-template-columns: repeat(3, 1fr); }
  .food-card { min-height: 91px; }
  .food-emoji { font-size: 38px; }
  .message-form { grid-template-columns: 1fr; }
  .message-send { min-height: 52px; grid-template-columns: auto auto; gap: 8px; }
  .family-gateway { grid-template-columns: 1fr; }
  .family-gateway > a { min-height: 54px; grid-template-columns: auto auto; }
}
@media (max-width: 350px) {
  .app-shell { padding-left: 11px; padding-right: 11px; }
  .robot-stage { height: 252px; }
  .quick-actions { grid-template-columns: 1fr; }
  .action-button { min-height: 70px; }
  .shared-meters { gap: 7px; }
  .meter-card { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
