/* הבית – שיחות: the grandparents' phone app and the tablets' call screen. Big text, one tap, no hover. */
:root {
  --bg: #f6f1ea; --card: #fffdf9; --ink: #15202b; --ink-2: #4a5560; --accent: #1b7550; --stop: #c9372a;
  --line: #e2dbd0; --rest: #0d1a18;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 600 22px/1.45 "Heebo", "Assistant", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; -webkit-text-size-adjust: 100%; overflow: hidden; }
body.boot .screen { display: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:active { transform: scale(.97); }
button:focus-visible { outline: 4px solid #4A7FE0; outline-offset: 3px; }
.stripe { position: fixed; inset: 0 0 auto 0; height: calc(6px + env(safe-area-inset-top, 0px)); z-index: 9; background: linear-gradient(90deg, #F27B5B 0 20%, #2BB3A3 20% 40%, #4A7FE0 40% 60%, #F5C23A 60% 80%, #9B6EDB 80%); }

.screen { position: fixed; inset: 0; overflow-y: auto; padding: calc(34px + env(safe-area-inset-top, 0px)) 18px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
h1 { margin: 6px 0 0; font-size: 36px; line-height: 1.2; font-weight: 800; }
.lead { margin: 0; font-size: 24px; max-width: 520px; }
.note { margin: 0; font-size: 22px; color: var(--ink-2); min-height: 1.4em; max-width: 520px; }
.note.ok { color: var(--accent); }

.kids { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 4px 0; }
.kids figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 22px; }
.kids img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; background: #e9e1d4; border: 4px solid #fff; box-shadow: 0 4px 14px rgba(60, 40, 20, .15); }

.big { width: min(100%, 520px); min-height: 96px; border-radius: 28px; display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 30px; font-weight: 800; padding: 10px 22px; box-shadow: 0 8px 22px rgba(23, 58, 48, .16); }
.big .ic { font-size: 40px; line-height: 1; }
.big.go { background: var(--accent); color: #fff; }
.big.soft { background: var(--card); color: var(--ink); border: 3px solid var(--accent); }
/* until the phone rings, calling the house is the second button */
#enable:not([hidden]) + #callHome { background: var(--card); color: var(--accent); border: 3px solid var(--accent); }

.steps { margin: 0; padding: 0 1.4em 0 0; text-align: right; font-size: 24px; max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.steps .key { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; border-radius: 10px; background: #fff; border: 2px solid var(--line); color: #2f6fe0; vertical-align: middle; }

/* the call */
.call { padding: 0; background: var(--rest); color: #fff; justify-content: flex-end; gap: 0; overflow: hidden; }
#remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--rest); opacity: 0; transition: opacity .4s; }
.live #remote { opacity: 1; }
#self { position: absolute; z-index: 3; top: calc(18px + env(safe-area-inset-top, 0px)); left: 14px; width: 28vw; max-width: 190px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; border: 3px solid #fff; transform: scaleX(-1); background: #22332f; }
#self.back { transform: none; }
.faces { position: absolute; inset: max(12%, calc(env(safe-area-inset-top, 0px) + 18px + min(28vw, 190px) * 4 / 3 + 16px)) 0 auto 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; padding: 0 16px; z-index: 2; }
.faces img { width: min(34vw, 190px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 6px solid #fff; background: #22332f; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.faces.many img { width: min(26vw, 150px); }
.ringing .faces img { animation: pulse 1.6s ease-in-out infinite; }
.live .faces { display: none; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.panel { position: relative; z-index: 4; width: 100%; padding: 22px 16px calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 10px; background: linear-gradient(0deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0)); }
.main { font-size: 34px; font-weight: 800; line-height: 1.2; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.sub { font-size: 22px; opacity: .92; min-height: 1.3em; }
.acts { display: flex; gap: 22px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.round { min-width: 150px; min-height: 96px; border-radius: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 28px; font-weight: 800; padding: 0 26px; color: #fff; }
.round.go { background: #1f9a5e; }
.round.stop { background: var(--stop); }
.tools { display: flex; gap: 12px; margin-top: 4px; }
.pill { min-height: 56px; padding: 0 20px; border-radius: 28px; background: rgba(255, 255, 255, .18); color: #fff; font-size: 20px; }
.pill[aria-pressed="true"] { background: #fff; color: var(--ink); }
.tap { position: absolute; z-index: 6; inset: auto 16px 48% 16px; min-height: 88px; border-radius: 26px; background: var(--accent); color: #fff; font-size: 26px; font-weight: 800; }

/* the tablet is landscape: video beside, buttons bigger */
@media (min-width: 900px) {
  .faces { inset: 12% 0 auto 0; }
  .main { font-size: 40px; }
  .round { min-width: 220px; min-height: 104px; font-size: 32px; }
  .faces img { width: 200px; }
}
@media (prefers-reduced-motion: reduce) { .ringing .faces img { animation: none; } }
