/* Friends use the public site's own cream, night sky and storybook lettering. */
.friends-hero .solo { padding-bottom: 48px; }
.friends-hero .kicker { color: var(--gold); }
.friends-hero .lede { max-width: 820px; }
.living-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; width: 100%; margin: 32px auto; }
.friend-scene { display: block; position: relative; aspect-ratio: 3 / 2; overflow: hidden; isolation: isolate; border: 0; padding: 0; width: 100%; background: var(--leaf); border-radius: 22px; }
button.friend-scene { cursor: pointer; touch-action: manipulation; }
.friend-scene .scene-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 80%; }
.friend-sprite { position: absolute; height: 96%; aspect-ratio: 1; bottom: -2%; left: 50%; translate: -50% 0; transform-origin: 50% 92%; pointer-events: none; }
.friend-pose { width: 100%; height: 100%; }
.friend-blink { position: absolute; height: auto; }
.friend-blink[hidden] { display: none; }
.living-row .friend-scene { aspect-ratio: 4 / 5; border-radius: 48% 48% 22px 22px; }
.living-row .friend-sprite { height: auto; width: 135%; bottom: 2%; }
.living-row .friend-scene:nth-child(even) { margin-top: 22px; }
.living-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; padding: 0; margin: 0; list-style: none; }
.living-cards li { min-width: 0; }
.living-cards h3 { margin: 16px 0 7px; }
.living-cards h3 a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.living-cards h3 a:hover { text-decoration: underline; }
.living-cards p { font-size: 16px; line-height: 1.45; color: var(--muted); }
.wonder-promise { margin: 12px 0 40px; }
.wonder-promise h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
.wonder-promise strong { display: inline-block; font-size: clamp(5rem, 14vw, 10rem); line-height: 1; letter-spacing: -.065em; color: var(--link); margin-right: .12em; }
.wonder-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; list-style: none; }
.wonder-chips li { border-radius: 999px; padding: 6px 14px; background: var(--soft); font-size: 14px; font-weight: 750; }
.screen-carousel { --slide-width: calc((100% - 24px) / 2); }
.phone-carousel { --slide-width: calc((100% - 48px) / 3); }
.screen-track { display: flex; position: relative; gap: 24px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 8px 0 16px; }
.screen-track::-webkit-scrollbar { display: none; }
.screen-slide { flex: 0 0 var(--slide-width); min-width: 0; margin: 0; scroll-snap-align: start; }
.screen-slide figcaption { margin: 16px 2px 0; font-weight: 800; line-height: 1.4; font-size: 19px; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.carousel-controls[hidden] { display: none; }
.carousel-controls button { font: inherit; display: grid; place-items: center; cursor: pointer; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink); }
.carousel-controls button:disabled { opacity: .35; cursor: default; }
.carousel-dots { display: flex; }
.carousel-dots button { background: transparent; width: 32px; border-radius: 12px; }
.carousel-dots span { width: 7px; height: 7px; border-radius: 999px; background: var(--muted); }
.carousel-dots [aria-current] span { background: var(--link); width: 20px; }
.rules-section { background: var(--surface); }
@media (max-width: 900px) {
  .living-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screen-carousel { --slide-width: 70%; }
  .phone-carousel { --slide-width: 46%; }
}
@media (max-width: 600px) {
  .living-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .living-row .friend-scene:nth-child(even) { margin-top: 0; }
  .living-row .friend-scene:nth-child(n+5) { left: 50%; }
  .living-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .living-cards .friend-scene { border-radius: 16px; }
  .living-cards h3 { margin-top: 8px; }
  .living-cards p { font-size: 14px; }
  .wonder-promise strong { display: block; }
  .screen-carousel { --slide-width: 88%; }
  .screen-track { gap: 16px; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
  .screen-slide figcaption { font-size: 17px; }
  .carousel-controls { gap: 3px; }
  .carousel-dots button { width: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .friend-sprite { transform: none !important; }
  .friend-blink { display: none !important; }
}

/* Device screens: a real-looking tablet and phone, drawn in CSS around our own screens. */
.mock-stage { position: relative; display: grid; place-items: center; height: 440px; padding: 36px 28px 28px; border-radius: 28px; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #ffffff26 0%, #ffffff00 70%), var(--soft); }
.screen-slide:nth-child(2n) .mock-stage { background: radial-gradient(120% 90% at 50% 0%, #ffffff26 0%, #ffffff00 70%), var(--leaf); }
.age-tag { position: absolute; z-index: 2; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px; border-radius: 999px; background: #fff; color: #2b2a26; font-weight: 850; font-size: 13px; box-shadow: 0 2px 8px #2b2a2618; }
.age-tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.device-mock { position: relative; width: 100%; background: #0c0d11; box-shadow: 0 0 0 1.5px #c9ccd3, 0 0 0 3.5px #7d818b, 0 0 0 4.5px #4a4d55, 0 34px 50px -16px #0f13308c, 0 12px 20px -8px #0f133059; }
.device-mock::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(118deg, #ffffff1f 0 18%, #ffffff00 18.2%); }
.device-screen { position: relative; height: 100%; overflow: hidden; background: #fff8ea; color: #2b2a26; font-size: 14px; line-height: 1.35; }

.tablet-carousel .device-mock { max-width: 520px; aspect-ratio: 4 / 3; padding: 16px; border-radius: 34px; }
.tablet-carousel .device-mock::before { content: ""; position: absolute; z-index: 1; top: 6px; left: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #3b4a66, #0b0c10 70%); }
.tablet-carousel .device-screen { border-radius: 18px; }
.tab-scene { position: absolute; inset: 0; }
.tab-scene .friend-scene.still { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; border-radius: 0; }
.tab-scene .scene-cover { object-position: 50% 85%; }
.tab-scene .friend-sprite { height: 82%; bottom: -3%; left: 28%; }
.bubble { position: absolute; top: 9%; right: 6%; max-width: 54%; margin: 0; padding: 12px 16px; border-radius: 20px 20px 20px 6px; background: #fff; font-weight: 850; font-size: clamp(14px, 1.6vw, 18px); line-height: 1.3; box-shadow: 0 6px 16px #2b2a2626; }
.play-dot, .why-button, .talk-button { position: absolute; right: 7%; bottom: 9%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; color: #2b2a26; }
.play-dot { width: 58px; height: 58px; border-radius: 50%; background: var(--gold); box-shadow: 0 5px 0 #c98400, 0 10px 18px #2b2a2633; font-size: 20px; padding-left: 4px; }
.why-button { padding: 10px 24px; border-radius: 999px; background: var(--gold); font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -.01em; box-shadow: 0 5px 0 #c98400, 0 10px 18px #2b2a2633; rotate: -5deg; animation: why-wiggle 3.2s ease-in-out infinite; }
.why-button::before { content: "✦"; position: absolute; top: -12px; right: -6px; font-size: 16px; color: #fff; text-shadow: 0 1px 2px #c98400; }
.why-button.go { background: #8fd16f; box-shadow: 0 5px 0 #4e9a3c, 0 10px 18px #2b2a2633; font-size: clamp(16px, 2vw, 20px); }
.talk-button { gap: 3px; padding: 12px 18px 12px 14px; border-radius: 999px; background: #ff7a59; color: #fff; font-size: 15px; box-shadow: 0 5px 0 #cc4f30, 0 10px 18px #2b2a2633; }
.talk-button i { width: 4px; height: 10px; margin-right: 1px; border-radius: 2px; background: #fff; animation: talk-wave 1s ease-in-out infinite; }
.talk-button i:nth-child(2) { animation-delay: -.2s; }
.talk-button i:nth-child(3) { animation-delay: -.4s; }
.talk-button i:nth-child(4) { animation-delay: -.6s; }
.talk-button i:nth-child(5) { animation-delay: -.8s; margin-right: 8px; }
@keyframes why-wiggle { 0%, 82%, 100% { rotate: -5deg; scale: 1; } 88% { rotate: 4deg; scale: 1.08; } 94% { rotate: -3deg; } }
@keyframes talk-wave { 0%, 100% { height: 6px; } 50% { height: 18px; } }

.phone-carousel .mock-stage { height: 560px; }
.phone-carousel .device-mock { max-width: 238px; aspect-ratio: 9 / 19.5; padding: 9px; border-radius: 44px; }
.phone-carousel .device-mock::before { content: ""; position: absolute; z-index: 1; top: 19px; left: calc(50% - 34px); width: 68px; height: 20px; border-radius: 12px; background: #0c0d11; }
.phone-carousel .device-screen { border-radius: 36px; padding-top: 46px; }
.app-bar { display: flex; align-items: center; gap: 9px; padding: 0 16px 14px; font-size: 16px; }
.app-dot { width: 26px; height: 26px; flex: none; border-radius: 9px; background: linear-gradient(140deg, var(--gold), var(--gold-deep)); }
.shield { display: flex; align-items: center; gap: 10px; margin: 0 12px 6px; padding: 12px; border-radius: 16px; background: #daedca; color: #304c28; font-size: 15px; }
.shield span { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: #4e9a3c; color: #fff; font-weight: 900; }
.safe-toggle { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; margin: 0 12px 8px; padding: 13px 14px; border-radius: 16px; background: #daedca; color: #304c28; }
.safe-toggle b { font-size: 15px; }
.safe-toggle small { grid-column: 1; font-size: 11.5px; font-weight: 750; }
.switch { grid-row: 1 / span 2; grid-column: 2; position: relative; width: 44px; height: 26px; border-radius: 999px; background: #4e9a3c; }
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; }
.ticks li b { display: block; font-size: 13px; }
.ticks { list-style: none; margin: 0; padding: 0 14px; }
.ticks li { position: relative; padding: 9px 0 9px 22px; border-bottom: 1px solid #ede5d6; font-size: 12.5px; font-weight: 650; }
.ticks li::before { content: "✓"; position: absolute; left: 2px; color: #4e9a3c; font-weight: 900; }
.mock-setting { padding: 6px 14px 12px; }
.mock-setting b { display: block; margin-bottom: 8px; font-size: 13px; color: #6b624f; }
.mock-setting .rule-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mock-setting .rule-chips span { color: #2b2a26; padding: 7px 11px; border-radius: 999px; background: #fff; border: 1.5px solid #e5dccb; font-size: 13px; font-weight: 750; }
.mock-setting .positive span { background: #f1f9ea; border-color: #bfe0aa; }
.mock-note { margin: 0; padding: 16px; border-radius: 4px 18px 18px; background: #fff0ad; font-size: 14px; line-height: 1.55; box-shadow: 0 2px 0 #e9d88e; rotate: -1deg; }
.mock-saved { padding: 4px 16px; font-size: 12.5px; font-weight: 750; color: #304c28; }
.time-choices { display: grid; gap: 10px; margin: 6px 14px; }
.time-choices span { padding: 13px 15px; border-radius: 14px; background: #fff; border: 1.5px solid #e5dccb; font-weight: 750; }
.time-choices .chosen { background: var(--gold); border-color: var(--gold); font-weight: 900; }
.time-choices i { float: right; font-style: normal; }
.chat-top { display: flex; align-items: center; gap: 8px; padding: 0 14px 10px; border-bottom: 1px solid #ede5d6; }
.chat-top small { margin-left: auto; color: #6b624f; font-size: 11px; }
.chat-face { display: inline-block; width: 30px; height: 30px; flex: none; overflow: hidden; border-radius: 50%; background: #cde9f6; }
.chat-top .chat-face { width: 36px; height: 36px; }
.chat-face img { width: 150%; height: 150%; max-width: none; margin: -12% 0 0 -25%; }
.kid-chat { display: grid; gap: 8px; padding: 12px 12px 8px; font-size: 12.5px; }
.kid-chat p { margin: 0; }
.kid-chat .kid { justify-self: end; max-width: 78%; padding: 9px 12px; border-radius: 18px 18px 5px 18px; background: #4c8df6; color: #fff; font-weight: 700; }
.kid-chat .pal { display: flex; align-items: flex-end; gap: 6px; max-width: 88%; }
.kid-chat .pal span:not(.chat-face) { padding: 9px 12px; border-radius: 18px 18px 18px 5px; background: #fff; box-shadow: 0 1px 3px #2b2a261f; font-weight: 650; }
.chat-actions { display: flex; gap: 6px; padding: 4px 12px; }
.chat-actions span { padding: 7px 12px; border-radius: 999px; background: #fff; border: 1.5px solid #e5dccb; font-size: 12px; font-weight: 800; }
.chat-actions span:first-child { background: var(--gold); border-color: var(--gold); }
.device-screen:has(.lock-time) { background: linear-gradient(170deg, #2b3a78 0%, #6b5aa6 60%, #e3a1a8 100%); color: #fff; }
.lock-time { text-align: center; font-size: 58px; font-weight: 300; letter-spacing: -.02em; margin: 10px 0 26px; }
.mock-alert { display: flex; gap: 10px; margin: 0 10px; padding: 12px; border-radius: 20px; background: #ffffffd9; color: #2b2a26; font-size: 12.5px; backdrop-filter: blur(8px); }
.mock-alert p { margin: 3px 0 0; }
.alert-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: linear-gradient(140deg, var(--gold), var(--gold-deep)); color: #fff; font-size: 16px; }
.mock-report { display: grid; gap: 12px; padding: 10px 12px; font-size: 12.5px; }
.mock-report p { margin: 0; padding: 12px; border-radius: 14px; background: #daedca; color: #304c28; }
.mock-flag { justify-self: start; padding: 8px 12px; border-radius: 999px; border: 1.5px solid #e5dccb; background: #fff; font-weight: 800; }

.free-callout p { margin: 0; padding: 14px 18px; border-radius: 18px; background: var(--leaf); color: var(--leaf-ink); max-width: 380px; }
.wonder-chips .free { background: var(--gold); color: var(--on-gold); }

/* FAQ as soft cards on this page. */
#questions .faq { display: grid; gap: 10px; max-width: 760px; }
#questions .faq details { border: 0; border-radius: 18px; background: var(--soft); padding: 0 18px; }
#questions .faq summary { padding: 18px 0; }
#questions .faq details p { padding: 0 0 18px; }

@media (max-width: 600px) {
  .mock-stage { height: 330px; padding: 40px 12px 16px; border-radius: 22px; }
  .tablet-carousel .device-mock { padding: 10px; border-radius: 24px; }
  .tablet-carousel .device-screen { border-radius: 14px; font-size: 13px; }
  .bubble { padding: 9px 12px; }
  .play-dot { width: 46px; height: 46px; }
  .phone-carousel .mock-stage { height: 520px; }
}
@media (prefers-reduced-motion: reduce) {
  .why-button, .talk-button i { animation: none; }
}

/* The tablet buttons really play the sky-blue wonder. */
button.play-dot, button.why-button { border: 0; cursor: pointer; font-family: inherit; touch-action: manipulation; transition: transform .14s cubic-bezier(.2, .8, .2, 1); }
button.play-dot:active, button.why-button:active { transform: translateY(3px); }
button.play-dot:focus-visible, button.why-button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.play-dot.is-playing, .why-button.is-playing { animation: talking-pulse 1.2s ease-in-out infinite; }
@keyframes talking-pulse { 0%, 100% { box-shadow: 0 5px 0 #c98400, 0 0 0 0 #ffc33a99; } 50% { box-shadow: 0 5px 0 #c98400, 0 0 0 12px #ffc33a00; } }
.tab-scene.is-talking .bubble { outline: 3px solid #ffc33a; }
@media (prefers-reduced-motion: reduce) { .play-dot.is-playing, .why-button.is-playing { animation: none; } }

/* Live talk header: the two ways to ask, side by side under the headline. */
.rules-head { margin-bottom: 28px; }
.rules-head h2 { margin-top: 6px; }
.mode-pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 18px 0 0; padding: 0; }
.mode-pills li { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 9px; border-radius: 999px; background: var(--soft); font-size: 15px; }
.mode-pills b { padding: 5px 11px; border-radius: 999px; background: var(--gold); color: #2b2a26; font-size: 13px; }
.mode-pills li + li b { background: var(--leaf); color: var(--leaf-ink); }

/* Lock-screen notification with the Lil' Phil mark. */
.mock-alert { position: relative; align-items: flex-start; }
.mock-alert b { display: block; padding-right: 26px; }
.mock-alert small { position: absolute; top: 12px; right: 12px; font-size: 10.5px; color: #6b624f; }
.alert-icon { background: #fff4d6; padding: 3px; }
.alert-icon img { width: 100%; height: 100%; }
.carousel-dots button[hidden] { display: none; }

/* While Roo answers, the app's light-kit drawing fills the tablet, timed to the words. */
.kit-stage { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.tab-scene.has-kit .kit-stage { opacity: 1; }
.tab-scene .friend-sprite { transition: height .5s cubic-bezier(.2, .8, .2, 1), left .5s cubic-bezier(.2, .8, .2, 1); }
.tab-scene.has-kit .friend-sprite { height: 50%; left: 13%; }
.tab-scene .bubble { transition: top .4s ease, bottom .4s ease; }
.tab-scene.has-kit .bubble { top: auto; bottom: 8%; right: auto; left: 27%; max-width: 44%; font-size: clamp(12px, 1.3vw, 15px); }
.kit-stage .draw { stroke-dasharray: 1; animation: kit-draw var(--d, 1s) ease-out var(--t, 0s) both; }
.kit-stage .pop { animation: kit-appear 450ms ease-out var(--t, 0s) both; transform-box: fill-box; transform-origin: center; }
.kit-stage .grow { animation: kit-grow 700ms ease-out var(--t, 0s) both; transform-box: fill-box; transform-origin: 50% 100%; }
.kit-stage .spin { animation: kit-spin 40s linear infinite; }
.kit-stage .float { animation: kit-float 5s ease-in-out infinite alternate; }
.kit-stage .scatter { animation: kit-scatter 1s ease-out var(--t, 0s) both, kit-twinkle 2400ms ease-in-out calc(var(--t, 0s) + 1s) infinite alternate; }
.kit-stage .lower { animation: kit-lower 1100ms ease-out both; }
.kit-stage .flyoff { animation: kit-flyoff 1900ms ease-out infinite; }
.kit-stage .glow { animation: kit-glow 1600ms ease forwards; }
.kit-stage .slip { animation: kit-slip 1400ms ease-in-out infinite; }
.kit-stage .jitter { animation: kit-jitter 140ms linear infinite; }
@keyframes kit-draw { from { stroke-dashoffset: 1; opacity: 0; } 2% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes kit-appear { from { opacity: 0; transform: scale(.6); } }
@keyframes kit-twinkle { from { opacity: .35; } to { opacity: 1; } }
@keyframes kit-grow { from { transform: scaleY(0); } }
@keyframes kit-spin { to { transform: rotate(360deg); } }
@keyframes kit-float { to { transform: translateX(10px); } }
@keyframes kit-scatter { from { opacity: 0; transform: translate(var(--sx), var(--sy)); } 30% { opacity: 1; } }
@keyframes kit-lower { from { transform: translateY(-70px); } }
@keyframes kit-flyoff { 0% { opacity: 0; transform: none; } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
@keyframes kit-glow { from { opacity: 0; } to { opacity: .3; } }
@keyframes kit-slip { 50% { transform: translateX(12px); } }
@keyframes kit-jitter { 25% { transform: translate(1.2px, -1px); } 75% { transform: translate(-1.2px, 1px); } }
.wonder-promise { margin-bottom: 28px; }
.wonder-promise h2 { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .3em; }
.more-wonders { display: inline-flex; margin-top: 22px; }
@media (prefers-reduced-motion: reduce) {
  .kit-stage * { animation: none !important; stroke-dasharray: none; }
  .kit-stage .glow { opacity: .3; }
  .tab-scene .friend-sprite, .tab-scene .bubble, .kit-stage { transition: none; }
}
.kit-stage { z-index: 1; }
.tab-scene .friend-scene.still .scene-cover { transition: opacity .5s ease; }
.tab-scene.has-kit .friend-scene.still { z-index: 2; background: transparent; }
.tab-scene.has-kit .friend-scene.still .scene-cover { opacity: 0; }
.tab-scene .bubble, .tab-scene .play-dot, .tab-scene .why-button, .tab-scene .talk-button { z-index: 3; }
.tab-scene.has-kit .friend-sprite { height: 44%; left: 11%; }
.tab-scene.has-kit .bubble { left: 24%; bottom: 7%; max-width: 36%; padding: 8px 11px; border-radius: 16px 16px 16px 5px; }

/* Meet them: the name sits on the picture, ages in the corner, and Zib's wide card marks the bigger kids' friend. */
.living-cards { gap: 28px 20px; }
.friend-card .card-art { position: relative; border-radius: 22px; overflow: hidden; transition: translate .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease; }
.friend-card:hover .card-art { translate: 0 -4px; box-shadow: 0 14px 24px -12px #0008; }
.living-cards .friend-card .friend-scene { aspect-ratio: auto; height: 200px; border-radius: 22px; }
.living-cards .friend-card.wide { grid-column: span 2; }
.friend-card .card-name { position: absolute; left: 12px; bottom: 12px; margin: 0; }
.friend-card .card-name a { min-height: 38px; padding: 0 16px; border-radius: 999px; background: #fff; color: #2b2a26; font-size: 17px; box-shadow: 0 4px 12px #2b2a2633; }
.friend-card .card-name a:hover { text-decoration: none; background: var(--gold); }
.card-age { position: absolute; top: 12px; right: 12px; padding: 4px 10px; border-radius: 999px; background: #ffffffe0; color: #2b2a26; font-size: 12px; font-weight: 850; }
.friend-card.wide .card-age { background: var(--gold); }
.living-cards .friend-card p { margin: 12px 4px 0; font-size: 15px; }

/* 5,000+ wonders on one line, with Hear more centred under the dots. */
.wonder-promise { margin: 0 0 30px; }
.wonder-promise h2 { margin: 0; font-size: clamp(1.7rem, 3.6vw, 2.9rem); line-height: 1.05; }
.wonder-promise strong { display: inline-block; font-size: clamp(3.4rem, 7.5vw, 6rem); margin-right: 0; }
.more-wonders { display: block; margin: 14px 0 0; text-align: center; }

/* Talk time shows what today looks like. */
.talk-meter { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 18px 14px 0; padding: 13px 14px; border-radius: 14px; background: #fff; border: 1.5px solid #e5dccb; font-size: 12.5px; }
.talk-meter span { color: #6b624f; font-weight: 750; }
.talk-meter i { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: #ede5d6; overflow: hidden; }
.talk-meter em { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.talk-after { margin: 12px 16px 0; font-size: 12px; line-height: 1.4; color: #304c28; font-weight: 750; }
.safe-toggle b { font-size: 14px; white-space: nowrap; }

@media (max-width: 900px) {
  .living-cards .friend-card.wide { grid-column: span 2; }
}
@media (max-width: 600px) {
  .wonder-promise strong { display: inline-block; }
  .living-cards .friend-card .friend-scene { height: 150px; }
  .living-cards .friend-card.wide { grid-column: span 2; }
  .friend-card .card-name a { font-size: 15px; min-height: 34px; padding: 0 12px; }
}
.more-wonders .friends-link { margin: 0; }

/* Live talk sits in its own night band, so it reads as a separate chapter. */
.rules-section.night { background: radial-gradient(900px 420px at 90% 0%, #3b2f7a66, transparent 60%), radial-gradient(800px 420px at 0% 100%, #2a3c8a55, transparent 60%), var(--night); }
.rules-section .rules-head { margin-bottom: 36px; }
.rules-section .rules-head h2 { color: var(--night-ink); }
.rules-section .mock-stage, .rules-section .screen-slide:nth-child(2n) .mock-stage { background: #ffffff0d; border: 1px solid #ffffff14; }
.rules-section .screen-slide figcaption { color: var(--night-ink); }
.rules-section .carousel-controls button { background: #ffffff14; color: var(--night-ink); }
.rules-section .carousel-dots button { background: transparent; }
.rules-section .carousel-dots span { background: var(--night-muted); }
.rules-section .carousel-dots [aria-current] span { background: var(--gold); }
#questions { padding-top: clamp(64px, 8vw, 104px); }

/* The setup screen: tap to ask on, live talk off. */
.mode-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 12px 10px; padding: 14px; border-radius: 16px; background: #fff; border: 1.5px solid #e5dccb; }
.mode-row.on { background: #daedca; border-color: #daedca; color: #304c28; }
.mode-row b { display: block; font-size: 15px; }
.mode-row small { font-size: 12px; font-weight: 700; color: #6b624f; }
.mode-row.on small { color: #304c28; }
.mode-row .switch { flex: none; position: relative; width: 44px; height: 26px; border-radius: 999px; background: #4e9a3c; }
.mode-row .switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; }
.mode-row .switch.off { background: #d9d1c0; }
.mode-row .switch.off::after { right: auto; left: 3px; }
.mode-note { margin: 8px 16px 0; font-size: 12.5px; line-height: 1.45; color: #6b624f; }

/* Modern devices: hairline metal edge, thin black bezel, big screens. */
.mock-stage { height: auto; min-height: 0; padding: 40px 24px 32px; }
.phone-carousel .mock-stage { height: auto; padding: 32px 20px; }
.phone-carousel .device-mock { max-width: 262px; padding: 4px; border-radius: 48px; background: #101114; box-shadow: 0 0 0 1.5px #b9bdc6, 0 0 0 2.5px #6d717a, 0 30px 48px -18px #0009, 0 10px 18px -8px #0006; }
.phone-carousel .device-mock::before { top: 13px; left: calc(50% - 38px); width: 76px; height: 22px; border-radius: 14px; background: #050506; z-index: 4; }
.phone-carousel .device-screen { border-radius: 44px; padding-top: 50px; }
.phone-carousel .device-screen > * { zoom: 1.08; }
.tablet-carousel .device-mock { max-width: 560px; padding: 7px; border-radius: 30px; background: #101114; box-shadow: 0 0 0 1.5px #b9bdc6, 0 0 0 2.5px #6d717a, 0 30px 48px -18px #0009, 0 10px 18px -8px #0006; }
.tablet-carousel .device-mock::before { display: none; }
.tablet-carousel .device-screen { border-radius: 23px; }
.device-mock::after { background: linear-gradient(118deg, #ffffff12 0 16%, #ffffff00 16.2%); }
@media (max-width: 600px) {
  .mock-stage { padding: 36px 12px 18px; }
  .tablet-carousel .device-mock { padding: 5px; border-radius: 22px; }
  .tablet-carousel .device-screen { border-radius: 17px; }
  .phone-carousel .mock-stage { padding: 24px 16px; }
}
.mode-faces { display: flex; justify-content: center; margin: 26px 12px 0; }
.mode-faces .chat-face { width: 34px; height: 34px; margin-left: -6px; border: 2px solid #fff8ea; box-sizing: content-box; }
.mode-faces .chat-face:first-child { margin-left: 0; }
.mode-note.center { text-align: center; margin-top: 8px; font-weight: 750; }
.rules-section.night { padding-top: clamp(36px, 4.5vw, 56px); padding-bottom: clamp(36px, 4.5vw, 56px); }

/* Settings screen: Live talk carries its daily amount and today's use inside one card. */
.mode-row > b { font-size: 15px; }
.mode-group { margin: 0 12px; border-radius: 16px; background: #fff; border: 1.5px solid #e5dccb; overflow: hidden; }
.mode-group .mode-row { margin: 0; border: 0; border-radius: 0; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 10px 12px 0; padding: 3px; border-radius: 12px; background: #ede5d6; }
.segmented span { padding: 7px 0; border-radius: 9px; text-align: center; font-size: 12px; font-weight: 800; color: #6b624f; }
.segmented .chosen { background: var(--gold); color: #2b2a26; box-shadow: 0 1px 2px #0002; }
.mode-group .talk-meter { margin: 10px 12px 12px; padding: 0; border: 0; background: none; }
.mode-faces { margin-top: 20px; }
.mode-group .mode-row.on { background: #daedca; }

/* Playful load (see .agents/skills/playful-motion): words pop, the friends hop in and land
   with a squash, then the button arrives with one wiggle. CSS only, so nothing waits on script. */
.pop-words span { display: inline-block; animation: word-pop 560ms cubic-bezier(.34, 1.56, .64, 1) calc(80ms + var(--i) * 70ms) both; }
@keyframes word-pop { from { opacity: 0; transform: translateY(.45em) scale(.7) rotate(-6deg); } 60% { opacity: 1; } }
.pop-in { animation: pop-in 520ms cubic-bezier(.34, 1.56, .64, 1) var(--d, 0ms) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(.94); } }
.wiggle-once { animation: pop-in 520ms cubic-bezier(.34, 1.56, .64, 1) var(--d, 0ms) both, wiggle 700ms ease-in-out calc(var(--d, 0ms) + 900ms) 1; }
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 20% { rotate: -4deg; } 40% { rotate: 3.5deg; } 60% { rotate: -2deg; } 80% { rotate: 1deg; } }
.friends-hero .living-row .friend-scene { transform-origin: 50% 100%; animation: friend-hop 720ms cubic-bezier(.3, .7, .4, 1) calc(480ms + var(--n, 0) * 85ms) both; }
.friends-hero .living-row .friend-scene:nth-child(2) { --n: 1; }
.friends-hero .living-row .friend-scene:nth-child(3) { --n: 2; }
.friends-hero .living-row .friend-scene:nth-child(4) { --n: 3; }
.friends-hero .living-row .friend-scene:nth-child(5) { --n: 4; }
.friends-hero .living-row .friend-scene:nth-child(6) { --n: 5; }
.friends-hero .living-row .friend-scene:nth-child(7) { --n: 6; }
@keyframes friend-hop {
  0% { opacity: 0; transform: translateY(70px) scale(.9, 1.12); }
  45% { opacity: 1; transform: translateY(-16px) scale(.95, 1.06); }
  68% { transform: translateY(0) scale(1.1, .88); }
  84% { transform: translateY(0) scale(.97, 1.03); }
  100% { transform: none; }
}

/* Below the fold, things hop in once as they arrive. friends.js adds .reveal, so no-JS readers see everything. */
.reveal { opacity: 0; transform: translateY(28px) scale(.97); }
.reveal.is-in { opacity: 1; transform: none; animation: reveal-hop 620ms cubic-bezier(.34, 1.56, .64, 1) calc(var(--ri, 0) * 75ms) both; }
@keyframes reveal-hop { from { opacity: 0; transform: translateY(28px) scale(.97); } 60% { opacity: 1; } }
.living-cards > li.reveal.is-in { animation-name: card-hop; animation-duration: 700ms; animation-timing-function: cubic-bezier(.3, .7, .4, 1); transform-origin: 50% 100%; }
@keyframes card-hop {
  0% { opacity: 0; transform: translateY(40px) scale(.94, 1.06); }
  50% { opacity: 1; transform: translateY(-8px) scale(.98, 1.03); }
  72% { transform: translateY(0) scale(1.04, .95); }
  100% { transform: none; }
}
.screen-slide.reveal.is-in .device-mock { animation: device-settle 820ms cubic-bezier(.34, 1.56, .64, 1) calc(var(--ri, 0) * 75ms + 120ms) both; }
@keyframes device-settle { from { transform: translateY(18px) rotate(-4deg); } }

@media (prefers-reduced-motion: reduce) {
  .pop-words span, .pop-in, .wiggle-once, .friends-hero .living-row .friend-scene, .reveal, .reveal.is-in, .screen-slide.reveal.is-in .device-mock { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Slides keep one fixed size at every width: the carousel shows as many as fit and the next
   one peeks in, so screens never squeeze or clip. */
.screen-carousel, .screen-carousel.tablet-carousel { --slide-width: min(540px, 86vw); }
.screen-carousel.phone-carousel { --slide-width: min(300px, 82vw); }
.screen-slide { flex: 0 0 var(--slide-width); }
.phone-carousel .device-mock { width: 252px; max-width: 100%; }
.mock-stage { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.device-screen { min-width: 0; }
.mode-faces .chat-face { width: 30px; height: 30px; }

/* The hero line plays out like a child asking: "Every why" lands big, "has another" follows,
   and a gold "why." drops in last with a bounce. */
.friends-hero .why-head { display: flex; flex-direction: column; align-items: center; margin: 0 auto 6px; line-height: .92; letter-spacing: -.035em; }
.why-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: .24em; }
.why-line.big { font-size: clamp(3.4rem, 10.5vw, 8rem); }
.why-line.small { font-size: clamp(2rem, 5.4vw, 4rem); margin-top: .08em; }
.why-head .w { display: inline-block; }
.why-head .why { color: var(--gold); }
.why-head .last { font-size: 1.75em; rotate: -6deg; transform-origin: 50% 90%; }
.why-line.big .w { animation: why-land 620ms cubic-bezier(.34, 1.56, .64, 1) calc(80ms + var(--i) * 150ms) both; }
.why-line.small .w:not(.last) { animation: why-rise 520ms cubic-bezier(.34, 1.56, .64, 1) calc(330ms + (var(--i) - 3) * 90ms) both; }
.why-head .last { animation: why-drop 820ms cubic-bezier(.3, .7, .4, 1) 600ms both; }
@keyframes why-land { from { opacity: 0; transform: translateY(-.25em) scale(1.4); } 55% { opacity: 1; transform: scale(.94); } }
@keyframes why-rise { from { opacity: 0; transform: translateY(.6em); } }
@keyframes why-drop {
  0% { opacity: 0; transform: translateY(-1.1em) rotate(-24deg) scale(.9, 1.1); }
  50% { opacity: 1; transform: translateY(.06em) rotate(4deg) scale(1.12, .86); }
  70% { transform: translateY(-.1em) rotate(-2deg) scale(.97, 1.04); }
  86% { transform: translateY(0) scale(1.02, .98); }
  100% { transform: none; }
}
.friends-hero .living-row .friend-scene { animation-delay: calc(700ms + var(--n, 0) * 80ms); }
@media (prefers-reduced-motion: reduce) {
  .why-head .w, .why-head .last { animation: none !important; }
}

/* Each "why" is a little Phil blob: it arrives puffed up and stretched, wobbles back into shape
   like jelly, then breathes gently like Phil floats. A hover or tap boops it. */
.why-head .w.why { transform-origin: 50% 85%; }
.why-line.big .w.why { --jd: 230ms; }
.why-head .w.why.last { --jd: 680ms; }
.friends-hero .why-head span[aria-hidden] { pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .why-head .w.why { animation: none !important; } }

/* Balloon whys: slower and bigger. They start small, inflate past full size, then squeeze and
   wobble back. Boops are run from friends.js on the independent scale property, once at a time. */
.why-line.big .w.why { font-size: 1.1em; }
.why-head .w.why { animation: why-balloon 1900ms cubic-bezier(.25, .8, .35, 1) var(--jd) both, why-breathe 6s ease-in-out calc(var(--jd) + 1900ms) infinite; }
.why-head .w.why { cursor: pointer; }
@keyframes why-balloon {
  0% { opacity: 0; transform: scale(.3, .25); }
  12% { opacity: 1; }
  28% { transform: scale(1.62, 1.48); }
  44% { transform: scale(.8, 1.24); }
  58% { transform: scale(1.2, .84); }
  72% { transform: scale(.93, 1.09); }
  86% { transform: scale(1.04, .97); }
  100% { transform: none; }
}
@keyframes why-breathe { 0%, 100% { transform: none; } 45% { transform: translateY(-.06em) scale(.96, 1.06); } 62% { transform: scale(1.06, .95); } }

/* Live talk's introduction: centred, marked New, with a looping example on a tablet. */
.talk-intro { display: grid; justify-items: center; text-align: center; margin: 8px 0 72px; }
.talk-intro h2 { margin: 14px 0 10px; color: var(--night-ink); font-size: clamp(2.2rem, 5vw, 3.6rem); }
.talk-intro > p { max-width: 34rem; margin: 0 0 30px; color: var(--night-muted); font-size: 1.1rem; }
.new-pill { display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px 7px 11px; border-radius: 999px; background: var(--gold); color: #2b2a26; font-weight: 900; font-size: 14px; }
.new-pill i { width: 9px; height: 9px; border-radius: 50%; background: #2b2a26; animation: new-ping 1.8s ease-out infinite; }
@keyframes new-ping { 0% { box-shadow: 0 0 0 0 #2b2a2666; } 70%, 100% { box-shadow: 0 0 0 9px #2b2a2600; } }
.talk-stage { width: min(640px, 100%); background: #ffffff0d; border: 1px solid #ffffff14; }
.talk-stage .device-mock.tablet { width: 100%; }
/* One loop every 9 s: the child holds the button and asks, Roo tilts to listen, then wags and answers. */
.talk-loop .friend-sprite { left: 26%; }
.talk-loop .pose-answer { position: absolute; z-index: 2; bottom: -3%; left: 26%; height: 82%; aspect-ratio: 1; translate: -50% 0; animation: talk-pose 9s infinite; }
.talk-loop .bubble { max-width: 50%; animation: 9s infinite both; }
.talk-loop .child-ask { top: 10%; right: 6%; background: #4c8df6; color: #fff; border-radius: 20px 20px 6px 20px; display: grid; gap: 6px; animation-name: talk-ask; }
.talk-loop .roo-says { top: 42%; right: 6%; animation-name: talk-reply; }
.talk-loop .talk-button { animation: talk-hold 9s infinite; }
.mini-wave { display: flex; gap: 3px; align-items: center; height: 14px; }
.mini-wave i { width: 3px; height: 6px; border-radius: 2px; background: #fff; animation: talk-wave 1s ease-in-out infinite; }
.mini-wave i:nth-child(2) { animation-delay: -.2s; } .mini-wave i:nth-child(3) { animation-delay: -.4s; } .mini-wave i:nth-child(4) { animation-delay: -.6s; } .mini-wave i:nth-child(5) { animation-delay: -.8s; }
@keyframes talk-hold { 0%, 4% { transform: none; } 6%, 30% { transform: scale(.94); filter: brightness(1.08); } 33%, 100% { transform: none; } }
@keyframes talk-ask { 0%, 6% { opacity: 0; transform: translateY(10px) scale(.9); } 10%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes talk-reply { 0%, 40% { opacity: 0; transform: translateY(12px) scale(.9); } 45%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes talk-pose { 0%, 40% { opacity: 0; } 42%, 90% { opacity: 1; } 93%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .talk-loop .pose-answer, .talk-loop .bubble, .talk-loop .talk-button, .new-pill i, .mini-wave i { animation: none !important; opacity: 1 !important; transform: none !important; }
  .talk-loop .pose-answer { opacity: 0 !important; }
}

/* The child-safe screen keeps its friends row inside the phone. */
.ticks li { padding: 7px 0 7px 22px; }

/* At phone width the answering pose stays inside the tablet. */
@media (max-width: 600px) { .talk-loop .pose-answer { left: 34%; } }
