/* Manager Everywhere: shared styles for the Hebrew (/) and English (/en/) pages.
   Text direction comes from <html dir>, so nothing here is RTL- or LTR-specific. */

/* Heebo, self-hosted (SIL OFL, see fonts/OFL-Heebo.txt). Variable font: one file per script covers 100-900. */
@font-face {
  font-family: "Heebo"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/heebo-hebrew-wght-normal.woff2) format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Heebo"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/heebo-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Layout: sealed package → one narrow column: headline, the mask, two download buttons, one challenge line. Single navy brand look. */
:root {
  --navy: #291155;
  --navy-deep: #1a0b38;
  --navy-soft: #35196b;
  --ink: #ffffff;
  --muted: #cbbdf0;
  --pink: #e31d74;
  --lav: #b47dff;
  --line: rgba(203, 189, 240, .25);
  --font: "Heebo", "Arial Hebrew", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--navy); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5; }
body.locked { overflow: hidden; }
.wrap {
  max-width: 520px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 36px 40px;
  display: grid; gap: 22px; justify-items: center; text-align: center;
}
h1 { margin: 0; font-weight: 900; font-size: clamp(38px, 10vw, 58px); line-height: .98; letter-spacing: -0.03em; text-wrap: balance; }
.pk { color: var(--pink); }
.sub { margin: 0; color: var(--muted); font-weight: 700; max-width: 34ch; }

.stage { position: relative; width: 100%; max-width: 380px; }
#editor {
  width: 100%; aspect-ratio: 3 / 4; height: auto; display: block;
  border-radius: 20px; background: var(--navy-deep);
  touch-action: none; cursor: grab;
  box-shadow: 0 24px 60px rgba(10, 4, 26, .55);
}
#editor:active { cursor: grabbing; }
.tag {
  position: absolute; top: 12px; right: 12px;
  background: var(--pink); color: #fff; font-weight: 900; font-size: 13px;
  padding: 4px 12px; border-radius: 99px;
}
.zoom { position: absolute; bottom: 12px; left: 12px; display: flex; gap: 6px; }
.zoom button {
  appearance: none; border: 0; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(26, 11, 56, .8); color: #fff; font: 900 20px var(--font); cursor: pointer;
}
.hint { margin: -8px 0 0; font-size: 14px; color: var(--muted); }
.stickers {
  width: 100%; max-width: 380px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  padding: 12px; border-radius: 16px;
  background: #efeae2 radial-gradient(rgba(0,0,0,.05) 1px, transparent 1.5px) 0 0 / 16px 16px;
}
.stickers img { width: 100%; height: auto; display: block; }
.stickers img[role=button] { cursor: pointer; }
.stk-label { margin: 0 0 -12px; font-size: 13px; font-weight: 800; letter-spacing: .06em; color: var(--lav); }

.btn {
  appearance: none; border: 0; cursor: pointer;
  font-family: var(--font); font-weight: 800; font-size: 18px;
  padding: 15px 26px; border-radius: 999px; width: 100%; max-width: 380px;
  background: var(--pink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s, filter .12s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn:focus-visible, .zoom button:focus-visible, .link:focus-visible, .check input:focus-visible, .stickers img:focus-visible { outline: 3px solid var(--lav); outline-offset: 3px; }
.actions { display: grid; gap: 10px; width: 100%; justify-items: center; }
.link { background: none; border: 0; color: var(--muted); font: 700 15px var(--font); text-decoration: underline; cursor: pointer; padding: 4px; }
input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.check { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--pink); }
.fine { margin: 0; font-size: 13px; color: var(--muted); opacity: .8; }
.msg { margin: 0; min-height: 1.4em; font-size: 14px; font-weight: 700; color: var(--lav); }
.msg.err { color: #ff8db9; }

.challenge {
  width: 100%; display: grid; gap: 6px; padding: 22px 20px; border-radius: 20px;
  background: var(--pink);
}
.challenge b { font-weight: 900; font-size: 26px; line-height: 1.05; }
.challenge span { font-weight: 700; font-size: 15px; }
.challenge span b { font-size: inherit; font-weight: 900; }
.challenge i { font-style: normal; font-weight: 900; color: var(--navy); }
.real { width: 100%; display: grid; gap: 12px; padding: 24px 22px; border-radius: 20px; background: var(--navy-soft); box-shadow: inset 0 0 0 2px var(--line); }
.real b { font-weight: 900; font-size: 24px; line-height: 1.15; }
.real b em { font-style: normal; color: var(--pink); }
.real span { font-weight: 700; font-size: 15px; color: var(--muted); }
.real a { justify-self: center; text-decoration: none; }
.logo { width: 110px; height: auto; opacity: .95; }

/* Sealed package */
.pkg {
  position: fixed; inset: 0; z-index: 50; background: var(--navy-deep);
  display: grid; place-items: center; align-content: center; gap: 22px; text-align: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  transition: opacity .5s ease .45s, visibility 0s linear .95s; overflow: hidden;
}
.pkg.open { opacity: 0; visibility: hidden; }
.pkg .arrived { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: .08em; color: var(--lav); }
.box { position: relative; width: min(340px, 82vw); aspect-ratio: 1.25; }
.box .body {
  position: absolute; inset: 22% 0 0 0; border-radius: 6px;
  background: #c9a477 repeating-linear-gradient(90deg, rgba(0,0,0,.025) 0 2px, transparent 2px 7px);
  box-shadow: inset 0 -10px 0 rgba(0,0,0,.08), 0 30px 60px rgba(0,0,0,.45);
}
.box .lid {
  position: absolute; inset: 10% -3% auto -3%; height: 18%; border-radius: 6px;
  background: #d6b285; box-shadow: 0 6px 0 rgba(0,0,0,.12);
  transform-origin: 85% 100%; transition: transform .6s cubic-bezier(.3,1.4,.5,1); z-index: 2;
}
.pkg.open .lid { transform: translate(-8%, -160%) rotate(-24deg); }
.tape {
  position: absolute; left: 0; right: 0; top: 50%; height: 15%; transform: translateY(-50%);
  background: var(--pink); color: #fff; overflow: hidden; white-space: nowrap;
  font-weight: 900; font-size: clamp(11px, 3.4vw, 14px); display: flex; align-items: center;
}
.tape span { padding-inline: 6px; }
.lid .tape { height: 60%; }
.box .body .tape { top: 24%; }
.label {
  position: absolute; right: 7%; bottom: 9%; width: 52%;
  background: #fffdf7; color: var(--navy); border-radius: 4px; padding: 8px 10px;
  text-align: start; font-size: clamp(11px, 3.2vw, 13px); line-height: 1.35; font-weight: 700;
  transform: rotate(-2deg); box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.label b { display: block; font-weight: 900; }
.stamp {
  position: absolute; left: 8%; bottom: 14%;
  border: 3px solid #b3123f; color: #b3123f; border-radius: 6px; padding: 2px 10px;
  font-weight: 900; font-size: clamp(14px, 4.4vw, 20px); transform: rotate(-14deg); opacity: .85;
}
.pkg h2 { margin: 0; font-weight: 900; font-size: clamp(34px, 8vw, 60px); line-height: 1; letter-spacing: -0.03em; }
.pkg .btn { width: auto; }
@media (prefers-reduced-motion: reduce) { .pkg, .box .lid, .btn { transition: none; } }
