@import "./actions.css";

/* Play the Parsha: the parsha path. One stylesheet for the home page and the play page. */
:root {
  --sky-a: #2aa6f5; --sky-b: #8fdcff;
  --grass: #4ccb4f; --grass-dk: #33a83a; --soil: #5b2a0c; --sun: #ffd23f; --red: #e8382b; --ink: #0f3d91;
  --road: #ffd98a; --road-edge: #b5741f; --stone: #7d97b8;
  --display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", "Ubuntu", "Trebuchet MS", system-ui, sans-serif;
  --heb: "Arial Hebrew", "Noto Sans Hebrew", "Rubik", "Heebo", "Assistant", "DejaVu Sans", Arial, sans-serif;
  --spring: cubic-bezier(.3, 1.6, .5, 1);
  color-scheme: light;
}
:root[data-time="eve"] { --sky-a: #ff7fb2; --sky-b: #ffd37a; }
:root[data-time="night"] { --sky-a: #121758; --sky-b: #3b3fc4; --grass: #2f9e4c; --grass-dk: #237f3e; }

.home[data-season] { --grass: var(--meadow); --grass-dk: var(--meadow-shade); }
.home[data-season="autumn"] {
  --day-sky-a: #62acd9; --day-sky-b: #f5e6c9;
  --meadow: #c5a16a; --meadow-shade: #a87549; --hill-light: #dab77b; --hill-shade: #b88b52;
  --leaf: #cb703e; --leaf-light: #e1a144; --tuft: #876748; --flower: #e88c60; --flower-light: #f7df9a;
}
.home[data-season="winter"] {
  --day-sky-a: #6a9cae; --day-sky-b: #bddbdc;
  --meadow: #75a795; --meadow-shade: #4f7d76; --hill-light: #8db8a0; --hill-shade: #65988b;
  --leaf: #4f8069; --leaf-light: #6c9a7f; --tuft: #4f8075; --flower: #c8dfd7; --flower-light: #e4eadb;
}
.home[data-season="spring"] {
  --day-sky-a: #54b3e7; --day-sky-b: #c2e8f5;
  --meadow: #8ccb75; --meadow-shade: #539d65; --hill-light: #a8d98e; --hill-shade: #73b66b;
  --leaf: #83ad68; --leaf-light: #9ebc7a; --tuft: #58995f; --flower: #ef8aad; --flower-light: #fff2e6;
}
.home[data-season="summer"] {
  --day-sky-a: #4aa8e2; --day-sky-b: #c2e4e6;
  --meadow: #d4bd74; --meadow-shade: #ad9958; --hill-light: #e2cb83; --hill-shade: #bca462;
  --leaf: #52894f; --leaf-light: #72a15a; --tuft: #918750; --flower: #edab43; --flower-light: #fff1a8;
}
.tree-blossoms, .home[data-season="winter"] .tree-leaves { display: none; }
.home[data-season="spring"] .tree-blossoms { display: inline; }
@supports (color: color-mix(in srgb, white, black)) {
  :root[data-time="night"] .home[data-season] {
    --grass: color-mix(in srgb, var(--meadow) 78%, #193654);
    --grass-dk: color-mix(in srgb, var(--meadow-shade) 78%, #193654);
  }
  :root[data-time="night"] .land .hl { fill: color-mix(in srgb, var(--hill-light) 78%, #193654); }
  :root[data-time="night"] .land .hl2 { fill: color-mix(in srgb, var(--hill-shade) 78%, #193654); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--grass); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; background: var(--grass); color: var(--soil); font-family: var(--display); }
h1, h2, p, ol { margin: 0; padding: 0; }
ol { list-style: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; cursor: pointer; }
svg { display: block; }
.he { font-family: var(--heb); direction: rtl; unicode-bidi: isolate; font-weight: 800; }
:focus-visible { outline: 5px solid var(--ink); outline-offset: 4px; border-radius: 18px; }
.noscript-title { padding: 2rem 1rem .5rem; font-size: 2.5rem; color: #fff; text-shadow: 0 3px 0 var(--ink); }
.nojs { padding: 0 1rem 2rem; font-size: 1.25rem; font-weight: 800; }
.foot { padding: .5rem 1rem calc(1.25rem + env(safe-area-inset-bottom)); text-align: center; font-weight: 800; color: #08320f; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .5rem; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .5rem; text-decoration: underline; }
.foot p { margin-top: .25rem; font-size: .9rem; }

/* ---------- sky ---------- */
.home { position: relative; background: var(--grass); }
.sky { position: relative; overflow: hidden; padding: 14px 16px 58px; padding-top: max(14px, var(--header-top-inset, env(safe-area-inset-top)));
  background: linear-gradient(var(--day-sky-a, var(--sky-a)), var(--day-sky-b, var(--sky-b))); }
@media (max-width: 699px) {
  .sponsor-strip + #home .sky { padding-block: 18px 26px; }
}
.sky[data-sky="dawn"] { background: linear-gradient(#688ab4, #f6b9b5 57%, #ffe6b6); }
.sky[data-sky="eve"] { background: linear-gradient(#76649c, #e88791 58%, #ffd297); }
.sky[data-sky="night"] { background: linear-gradient(#232650, #45487d 60%, #827091); }
.sky[data-sky="rainbow"] { background: linear-gradient(#536e8a, #86a2b7 55%, #c0d9de); }
.sky h1 { position: relative; z-index: 2; width: min(64vw, 252px); transform: rotate(-3deg); transform-origin: left center; }
.wordmark { width: 100%; height: auto; overflow: visible; }
.sky:has(.give-link) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0 12px; }
.sky:has(.give-link) h1 { max-width: 100%; }
.give-toggle, .give-link { position: relative; z-index: 3; align-items: center; justify-self: end; gap: 7px; min-height: 44px;
  padding: 5px 10px; border: 2px solid var(--soil); border-radius: 14px; background: #fff5cf; box-shadow: 0 3px 0 var(--soil);
  color: var(--soil); text-align: left; font-size: .83rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.give-link { display: inline-flex; grid-column: 2; max-width: min(260px, 42vw); }
.give-toggle { display: none; }
.give-toggle small, .give-link small { display: block; margin-bottom: 2px; font-size: .65rem; }
.give-coin { display: grid; place-items: center; flex: none; width: 19px; height: 19px; border: 2px solid #9a560e; border-radius: 50%; background: var(--sun); }
.give-coin::after { content: ""; width: 9px; height: 9px; border: 1px solid #9a560e; border-radius: 50%; }
.give-toggle:hover, .give-link:hover { background: #ffecab; }
@media (max-width: 599px) {
  .give-toggle { display: inline-flex; white-space: nowrap; }
  .give-link { grid-column: 1 / -1; max-width: 100%; margin-top: 8px; }
  .give-toggle[aria-expanded="false"] + .give-link { display: none; }
  .give-link small { display: none; }
}
.orb { position: absolute; z-index: 1; right: -34px; top: -34px; width: 150px; height: 150px; }
.orb.moon { right: 8px; top: 8px; width: 92px; height: 92px; }
.cloud { position: absolute; z-index: 1; width: 96px; opacity: .96; animation: drift 26s ease-in-out infinite alternate; }
.cloud.c1 { right: 18px; top: 104px; width: 86px; }
.cloud.c2 { left: 58%; top: 22px; width: 64px; animation-duration: 34s; animation-delay: -12s; }
.cloud.c3 { left: -8px; bottom: 50px; width: 104px; animation-duration: 40s; animation-delay: -20s; }
.sky:is([data-sky="dawn"], [data-sky="eve"]) .sun { top: 24%; right: 6%; width: clamp(78px, 15vw, 168px); height: auto; }
.sky[data-sky="dawn"] .sun { right: 20%; }
.sky[data-sky="night"] .cloud { opacity: .42; }
.rainbow { position: absolute; z-index: 1; right: -2%; top: 14%; width: min(65%, 560px); }
.cloud.storm { right: 24px; top: 0; width: min(66%, 530px); }
.st { position: absolute; width: 14px; height: 14px; }
@keyframes drift { from { translate: -14px 0; } to { translate: 30px 0; } }

/* ---------- the map ---------- */
.map { position: relative; overflow: hidden; min-height: 520px; }
.map > .land, .map > .road { position: absolute; left: 0; top: 0; pointer-events: none; }
.landscape { position: absolute; z-index: 1; inset: 0 0 auto; pointer-events: none; }
.map > .road { z-index: 1; }
.land .hl { fill: var(--hill-light, #59d35c); } .land .hl2 { fill: var(--hill-shade, #43bf47); }
.weather { opacity: .68; }
.weather-bit { animation: seasonal-drift 11s ease-in-out infinite; }
.weather-bit.p1 { animation-delay: -8s; }
.weather-bit.p2 { animation-delay: -5s; }
.weather-bit.p3 { animation-delay: -3s; }
.weather.rain { opacity: .62; }
.weather.rain .weather-bit { animation-name: seasonal-rain; animation-duration: 3.5s; }
@keyframes seasonal-drift { 0% { translate: -6px -20px; opacity: 0; } 18%, 74% { opacity: 1; } 100% { translate: 24px 56px; opacity: 0; } }
@keyframes seasonal-rain { 0% { translate: 8px -24px; opacity: 0; } 25%, 65% { opacity: 1; } 100% { translate: -18px 49px; opacity: 0; } }
.map > .lock, .map > .start, .map .sign, .map .stop { position: absolute; z-index: 2; }
.book li { margin: 0; }

/* scene animations (inside the round pictures and the meadow) */
.tw { animation: tw 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.d1 { animation-delay: -.7s; } .d2 { animation-delay: -1.4s; } .d3 { animation-delay: -2.1s; }
.spin { animation: spin 50s linear infinite; transform-box: fill-box; transform-origin: center; }
.bob { animation: bob 2.2s ease-in-out infinite; }
.flow { animation: flow 3s ease-in-out infinite; }
.wave { animation: wave 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: left center; }
.glow { animation: lamp 3s ease-in-out infinite; }
.drift { animation: puff 6s ease-in-out infinite alternate; }
.flap { animation: flap .5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes tw { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.6); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2px; } }
@keyframes flow { 50% { translate: 4px 0; opacity: .6; } }
@keyframes wave { 50% { transform: skewY(-7deg) scaleX(.92); } }
@keyframes lamp { 50% { opacity: .7; } }
@keyframes puff { to { translate: 3px -2px; } }
@keyframes flap { to { transform: scaleX(.35); } }
/* Only this week's picture moves by itself; the other stops come alive under the pointer (keeps phones cool). */
.stop:not(:hover):not(:focus-visible) .medal * { animation: none; }

/* round pictures */
.mw { position: relative; display: block; flex: none; }
.medal { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #fff; border: 6px solid #fff;
  box-shadow: 0 0 0 4px var(--soil), 0 8px 0 4px rgba(40, 20, 0, .3); }
.medal svg { width: 100%; height: 100%; }
.num { position: absolute; left: 0; top: 0; z-index: 2; display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 99px;
  background: var(--sun); border: 3px solid var(--soil); font-size: .95rem; font-weight: 900; line-height: 1; color: var(--soil); box-shadow: 0 3px 0 var(--soil); }

/* ---------- this week ---------- */
.now { position: relative; z-index: 2; margin-inline: auto; display: flex; flex-direction: column; align-items: center;
  width: max-content; max-width: calc(100% - 16px); }
.now .pic { display: block; border-radius: 50%; }
.mw.big { width: var(--D); height: var(--D); }
.mw.big .medal { border-width: 9px; box-shadow: 0 0 0 5px var(--soil), 0 0 0 16px var(--sun), 0 0 0 21px var(--soil), 0 0 50px 34px rgba(255, 246, 170, .85); animation: halo 2.6s ease-in-out infinite; }
@keyframes halo { 50% { box-shadow: 0 0 0 5px var(--soil), 0 0 0 16px var(--sun), 0 0 0 21px var(--soil), 0 0 76px 50px rgba(255, 246, 170, 1); } }
.mw.big .num { left: auto; right: 2%; top: auto; bottom: 14%; min-width: 44px; height: 44px; font-size: 1.35rem; border-width: 4px; }
.medal.lockbig { display: grid; place-items: center; background: var(--stone); }
.lockbig svg { width: 40%; height: 40%; fill: #eef4fb; }
.kicker { position: absolute; z-index: 3; left: 50%; top: -22px; translate: -50% 0; rotate: -4deg; white-space: nowrap;
  background: var(--sun); color: var(--soil); border: 4px solid var(--soil); border-radius: 12px; padding: 3px 14px 5px; font-size: 1.2rem; font-weight: 900; text-transform: uppercase; box-shadow: 0 4px 0 var(--soil); }
.flag { position: absolute; z-index: 1; width: 56px; left: -34px; top: -8px; }
.card { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; margin-top: -18px; }
.banner { position: relative; isolation: isolate; display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 0 12px; padding: 6px 42px 10px; rotate: -2deg; filter: drop-shadow(0 5px 0 #7a1510); max-width: calc(100vw - 20px); }
.banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--red); clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%); }
.banner .he { color: #fff; font-size: clamp(2.6rem, 13vw, 4rem); line-height: 1.08; }
.banner .en { color: #fff3b0; font-size: 1.2rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.actions { display: flex; gap: 14px; margin-top: 20px; width: min(calc(100vw - 32px), 340px); }
.now .play { flex: 1; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 84px; border-radius: 999px;
  background: var(--sun); color: var(--soil); border: 5px solid var(--soil); box-shadow: 0 10px 0 var(--soil), inset 0 -9px 0 #f0a500, inset 0 7px 0 #fff3a8;
  font-size: 2.4rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; animation: bounce 2.4s ease-in-out infinite;
  transition: transform .12s var(--spring), box-shadow .12s, background-color .15s; }
.now .play svg { width: 36px; height: 36px; fill: var(--soil); }
.now .share { flex: none; width: 84px; min-height: 84px; display: grid; place-items: center; align-content: center; gap: 2px; padding: 0;
  background: #fff; color: var(--soil); border: 5px solid var(--soil); border-radius: 50%; box-shadow: 0 10px 0 var(--soil); font-size: .85rem; font-weight: 900;
  transition: transform .12s var(--spring), box-shadow .12s, background-color .15s; }
.now .share svg { width: 28px; height: 28px; fill: var(--soil); }
.coming { margin-top: 20px; rotate: -2deg; background: #fff; color: var(--ink); border: 5px solid var(--ink); border-radius: 999px; padding: 8px 24px 10px;
  font-size: clamp(1.5rem, 7.4vw, 2rem); font-weight: 900; white-space: nowrap; box-shadow: 0 7px 0 var(--ink); animation: nudge 3.2s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { translate: 0 0; } 40% { translate: 0 -6px; } 55% { translate: 0 0; scale: 1.03 .97; } 65% { scale: 1; } }
@keyframes nudge { 0%, 70%, 100% { rotate: -2deg; } 78% { rotate: 2deg; } 86% { rotate: -4deg; } }
@media (hover: hover) {
  .now .play:hover { background: #ffe066; transform: translateY(-3px); box-shadow: 0 13px 0 var(--soil), inset 0 -9px 0 #f0a500, inset 0 7px 0 #fff3a8; animation-play-state: paused; }
  .now .share:hover { background: #fff8d6; transform: translateY(-3px) rotate(-6deg); box-shadow: 0 13px 0 var(--soil); }
  .now .pic:hover .medal { scale: 1.03; }
}
.now .play:active { animation: none; transform: translateY(10px) scale(1.04, .92); box-shadow: 0 0 0 var(--soil), inset 0 -5px 0 #f0a500; }
.now .share:active { transform: translateY(10px); box-shadow: 0 0 0 var(--soil); }
.now .play:focus-visible, .now .share:focus-visible { border-radius: 999px; }
.now .medal { transition: scale .2s var(--spring); }

/* wide screens: the picture and the card side by side */
.now.wide { flex-direction: row; align-items: center; gap: 56px; }
.now.wide .card { margin-top: 0; align-items: flex-start; }
.now.wide .flag { width: 70px; left: -50px; top: -10px; }
.now.wide .kicker { font-size: 1.5rem; top: -26px; }
.now.wide .banner { padding: 8px 56px 14px; margin-left: -18px; }
.now.wide .banner .he { font-size: clamp(4rem, 6vw, 5.5rem); }
.now.wide .banner .en { font-size: 1.5rem; }
.now.wide .actions { width: 400px; margin-top: 30px; }
.now.wide .play { min-height: 96px; font-size: 2.8rem; }
.now.wide .share { width: 96px; min-height: 96px; font-size: 1rem; }
.now.wide .coming { margin-top: 28px; font-size: 2.2rem; }

/* ---------- locks, signs, stops ---------- */
.lock { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--stone); border: 5px solid #c9d8ea; box-shadow: 0 0 0 4px #39506e, 0 6px 0 3px rgba(20, 30, 60, .3); }
.lock svg { width: 24px; height: 24px; fill: #eef4fb; }
.lock.l0 { width: 42px; height: 42px; opacity: .8; border-width: 4px; }
.lock.l0 svg { width: 18px; height: 18px; }
.start { width: 104px; }

.sign { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 14px 8px 20px; border: 4px solid var(--soil); border-radius: 14px;
  background: #c8763c repeating-linear-gradient(180deg, transparent 0 13px, rgba(91, 42, 12, .22) 13px 15px); color: #fff; box-shadow: 0 6px 0 var(--soil);
  font-size: 1.25rem; font-weight: 900; letter-spacing: .02em; transition: transform .15s var(--spring), box-shadow .12s; }
.sign::before, .sign::after { content: ""; position: absolute; z-index: -1; top: 100%; width: 10px; height: 22px; background: #7a3d12; border: 3px solid var(--soil); border-top: 0; }
.sign::before { left: 18%; } .sign::after { right: 18%; }
.sign .he { color: #ffe27a; font-size: 1.45rem; line-height: 1; }
.sign .en { text-shadow: 0 2px 0 rgba(91, 42, 12, .6); }
.chev { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(91, 42, 12, .35); transition: rotate .2s var(--spring); }
.chev svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.sign[aria-expanded="false"] .chev { rotate: -90deg; }
.sign:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--soil); }
.sign:focus-visible { border-radius: 14px; }

.stop { display: flex; align-items: center; gap: 10px; border-radius: 999px; }
.stop.r { flex-direction: row-reverse; }
.stop.col { flex-direction: column; gap: 10px; }
.stop .mw { width: var(--m); height: var(--m); transition: transform .2s var(--spring); }
.tag { display: grid; justify-items: start; background: #fff; border: 4px solid var(--soil); border-radius: 18px; padding: 3px 14px 7px; box-shadow: 0 5px 0 var(--soil); white-space: nowrap; transition: transform .2s var(--spring); }
.stop.r .tag { justify-items: end; }
.stop.col .tag { justify-items: center; }
.tag .he { font-size: 1.75rem; line-height: 1.15; color: var(--soil); }
.tag .en { font-size: 1rem; font-weight: 800; color: #3b2a1a; }
.stop.small .mw { width: 50px; height: 50px; }
.map.wide .stop.small .mw { width: 58px; height: 58px; }
.stop.small .medal { border-width: 3px; box-shadow: 0 0 0 3px var(--soil), 0 4px 0 3px rgba(40, 20, 0, .3); }
.stop.small .tag, .stop.small .num { display: none; }
@media (hover: hover) {
  .stop:hover .mw { transform: translateY(-5px) rotate(-4deg) scale(1.07); }
  .stop:hover .tag { transform: translateY(-2px) rotate(1.5deg); }
  .sign:hover { transform: translateY(-2px) rotate(-1deg); }
}
.stop:active .mw { transform: scale(.92); transition-duration: .06s; }
.stop:focus-visible { outline-offset: 6px; }

/* the path game */
.path-game { position: relative; z-index: 1; max-width: 100%; margin-inline: auto; overflow: hidden; pointer-events: none; }
.path-game.is-playing, .walker { pointer-events: auto; touch-action: manipulation; }
.walker { position: absolute; z-index: 1; left: -38px; top: -53px; width: 76px; height: 61px;
  padding: 0; border: 0; border-radius: 16px; background: transparent; }
.walker-art { display: block; pointer-events: none; transform-origin: center 88%; }
.walker-shadow { position: absolute; bottom: 3px; left: 18%; width: 64%; height: 8px; border-radius: 50%; background: #5b2a0c30; }
.walker svg, .path-prop svg, .path-star svg, .path-pebble svg, .path-score svg { width: 100%; height: auto; }
.walker-start { position: absolute; right: 0; bottom: 4px; width: 26px; height: 26px; display: grid; place-items: center;
  border: 2px solid var(--soil); border-radius: 50%; background: var(--sun); box-shadow: 0 2px var(--soil); }
.walker-start svg { width: 12px; fill: var(--soil); }
.is-playing .walker-start { display: none; }
.is-playing .walker, .is-playing .walker-art { will-change: transform; }
.path-meta { position: absolute; inset: 0 0 auto; display: flex; align-items: center; justify-content: center;
  gap: 7px; pointer-events: none; font-size: .82rem; font-weight: 900; }
.path-hint, .path-score { border: 2px solid var(--soil); border-radius: 999px; padding: 3px 9px;
  background: #fff6d5; box-shadow: 0 2px 0 var(--soil); }
.path-score { display: inline-flex; align-items: center; gap: 3px; background: var(--sun); font-variant-numeric: tabular-nums; }
.path-score-star { width: 19px; }
.path-hint[hidden], .path-score[hidden] { display: none; }
.path-prop, .path-pebble, .path-star { position: absolute; pointer-events: none; }
.path-prop { width: 48px; left: -24px; top: -23px; }
.path-pebble { width: 34px; left: -17px; top: -24px; }
.path-star { width: 29px; left: -14.5px; top: -12px; }
.path-star.is-missed { opacity: .38; }
.path-star.is-collected { visibility: hidden; }

/* ---------- arriving ---------- */
.enter .sky h1 { animation: drop .8s var(--spring) .05s both; }
.enter .now .mw { animation: pop .7s var(--spring) .2s both; }
.enter .now .card { animation: rise .6s var(--spring) .45s both; }
.enter .road { animation: unroll 1.8s ease-out .25s both; }
.enter .lock, .enter .sign, .enter .stop, .enter .start, .stop.pop { animation: pop .55s var(--spring) var(--d, 0ms) both; }
.enter .land { animation: fade .8s ease-out both; }
@keyframes drop { from { transform: translateY(-120%) rotate(-12deg); } }
@keyframes pop { from { opacity: 0; scale: .4; } }
@keyframes rise { from { opacity: 0; translate: 0 30px; } }
@keyframes unroll { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- wider screens ---------- */
@media (min-width: 700px) {
  .sky { padding: 22px 40px 70px; }
  .sky h1 { width: 330px; }
  .orb { right: 9%; top: -28px; width: 190px; height: 190px; }
  .orb.moon { right: 10%; top: 18px; width: 120px; height: 120px; }
  .cloud.c1 { right: 30%; top: 70px; width: 120px; }
  .cloud.c2 { left: 46%; top: 24px; width: 90px; }
  .cloud.c3 { left: auto; right: 2%; bottom: 60px; width: 140px; }
  .tag .he { font-size: 1.9rem; }
  .sign { font-size: 1.45rem; min-height: 60px; padding: 8px 18px 10px 26px; }
  .sign .he { font-size: 1.7rem; }
}
@media (min-width: 1280px) { .sky h1 { width: 380px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- the play page ---------- */
body.game-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #123; }
.bar { position: relative; z-index: 1; flex: none; display: flex; align-items: center; gap: 8px; min-height: 60px;
  padding: 6px max(8px, env(safe-area-inset-right)) 10px max(8px, env(safe-area-inset-left)); padding-top: max(6px, var(--header-top-inset, env(safe-area-inset-top)));
  background: linear-gradient(var(--sky-a), var(--sky-b)); border-bottom: 6px solid var(--grass); box-shadow: 0 3px 0 var(--grass-dk); }
.bar a, .bar button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px 0 10px; flex: none;
  border-radius: 999px; border: 4px solid var(--soil); background: #fff; color: var(--soil); box-shadow: 0 4px 0 var(--soil);
  font-size: 1.05rem; font-weight: 900; white-space: nowrap; transition: transform .12s var(--spring), box-shadow .12s; }
.bar svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.bar .fs { padding: 0; width: 48px; }
.bar .fs[hidden] { display: none; }
.bar a:active, .bar button:active { transform: translateY(4px); box-shadow: 0 0 0 var(--soil); }
@media (hover: hover) { .bar a:hover, .bar button:hover { background: #fff6c8; transform: translateY(-2px); box-shadow: 0 6px 0 var(--soil); } }
.bar a:focus-visible, .bar button:focus-visible { border-radius: 999px; }
.bar .name { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 10px; color: #fff; font-weight: 900; white-space: nowrap; overflow: hidden;
  text-shadow: 0 2px 0 var(--ink), 0 0 6px rgba(15, 61, 145, .6); }
.bar .name .he { font-size: 1.7rem; line-height: 1; }
.bar .name .en { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .05em; }
.stage { flex: 1; min-height: 0; display: flex; padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); background: #123; }
.stage iframe { flex: 1; width: 100%; height: 100%; border: 0; display: block; background: #000; }
@media (max-width: 520px) { .bar .name .en { display: none; } }
@media (max-width: 420px) { .bar { gap: 6px; } .bar a { padding: 0 12px 0 6px; font-size: 1rem; } .bar .share .lbl { display: none; } .bar .share { padding: 0; width: 48px; } .bar .name .he { font-size: 1.55rem; } }
@media (max-height: 500px) and (orientation: landscape) {
  .bar { min-height: 48px; padding-top: max(4px, var(--header-top-inset, env(safe-area-inset-top))); padding-bottom: 6px; border-bottom-width: 4px; }
  .bar a, .bar button { min-height: 38px; font-size: .95rem; border-width: 3px; box-shadow: 0 3px 0 var(--soil); }
  .bar .fs { width: 42px; }
  .bar .name .he { font-size: 1.4rem; }
}
:fullscreen .bar { min-height: 48px; }
