:root {
  --ink: #1d2a5b;
  --ink-soft: #55608c;
  --sky: #8fd6ff;
  --sky-light: #d9f2ff;
  --cream: #fff9ec;
  --paper: #ffffff;
  --sun: #ffc83d;
  --coral: #ff6b5e;
  --grass: #7ccb5f;
  --line: 3px solid var(--ink);
  --head: Fredoka, Rubik, Arial, sans-serif;
  --body: Rubik, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.5 var(--body); overflow-x: hidden; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid #c8321f; outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; top: -60px; right: 12px; z-index: 30; padding: 8px 14px; background: var(--ink); color: #fff; border-radius: 0 0 10px 10px; }
.skip:focus { top: 0; }

.account-btn { position: absolute; top: 10px; inset-inline-start: 12px; z-index: 3; padding: 6px 14px; border: var(--line); border-radius: 12px; background: var(--paper); font: 600 16px/1.2 var(--head); }

.notice { padding: 9px 16px; background: var(--ink); color: #fff; text-align: center; font-weight: 500; }

/* ----- הכותרת: שמיים, שמש וגבעות ----- */
.hero { position: relative; overflow: hidden; padding: 28px 16px 118px; background: linear-gradient(#8fd6ff, #d9f2ff 92%); }
.hero-in { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 28px; max-width: 900px; margin: 0 auto; }
.logo { width: 132px; height: auto; flex: none; transform: rotate(8deg); animation: settle 1.1s cubic-bezier(.2, 1.3, .4, 1) both; transform-origin: 50% 94%; }
.hero-text { text-align: center; }
.hero h1 { font: 700 clamp(44px, 9vw, 76px)/1.02 var(--head); letter-spacing: 0; }
#tagline { margin-top: 6px; font: 500 clamp(18px, 3.2vw, 24px)/1.2 var(--body); }
.spin-btn {
  margin-top: 18px; padding: 12px 26px; border: var(--line); border-radius: 18px; background: var(--sun);
  font: 700 21px/1.1 var(--head); box-shadow: 0 6px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.spin-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.spin-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.spin-hint { margin-top: 12px; font-size: 15px; color: var(--ink-soft); }

.sun { position: absolute; top: 22px; left: 5%; width: 84px; height: 84px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 16px rgba(255, 200, 61, .28), 0 0 0 34px rgba(255, 200, 61, .14); }
.cloud { position: absolute; width: 124px; height: 38px; border-radius: 40px; background: #fff; opacity: .92; }
.cloud::before, .cloud::after { content: ''; position: absolute; bottom: 12px; border-radius: 50%; background: #fff; }
.cloud::before { right: 20px; width: 56px; height: 56px; }
.cloud::after { left: 22px; width: 38px; height: 38px; }
.c1 { top: 40px; right: 5%; animation: drift 34s ease-in-out infinite alternate; }
.c2 { top: 136px; left: 13%; transform: scale(.7); animation: drift 44s ease-in-out infinite alternate-reverse; }
.c3 { top: 18px; left: 36%; transform: scale(.5); opacity: .7; animation: drift 52s ease-in-out infinite alternate; }
.hills { position: absolute; inset: auto 0 -1px; z-index: 1; width: 100%; height: 124px; }

@keyframes drift { from { margin-inline-start: -30px; } to { margin-inline-start: 50px; } }
@keyframes settle { from { transform: rotate(-30deg) translateY(-24px); opacity: 0; } to { transform: rotate(8deg); opacity: 1; } }
@keyframes whirl {
  0% { transform: rotate(8deg) rotateY(0); }
  70% { transform: rotate(-4deg) rotateY(1620deg); }
  85% { transform: rotate(12deg) rotateY(1760deg); }
  100% { transform: rotate(8deg) rotateY(1800deg); }
}
.logo.whirl { animation: whirl 1.5s cubic-bezier(.2, .7, .3, 1) both; }

/* ----- תוכן ----- */
main { max-width: 1120px; margin: 0 auto; padding: 8px 16px 44px; }

/* גיבורי הזמן */
.timebar { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; padding: 14px 20px; border: var(--line); border-radius: 22px; background: #d8f3cf; box-shadow: 0 6px 0 var(--ink); }
.tb-icon { flex: none; }
.tb-text { flex: 1; min-width: 0; }
.tb-text h2 { font: 700 25px/1.2 var(--head); }
.tb-text p { font-size: 16px; line-height: 1.35; }
.tb-actions { display: flex; flex: none; flex-direction: column; align-items: center; gap: 6px; }
.timebar .link-btn { font-size: 14.5px; }

.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 24px; }
.tab { padding: 8px 20px; border: var(--line); border-radius: 14px; background: var(--paper); font: 600 18px/1.2 var(--head); transition: transform .12s, background .12s; }
.tab:hover { transform: translateY(-2px); }
.tab[aria-pressed='true'] { background: var(--ink); color: #fff; }

.search { display: block; max-width: 340px; margin: 0 auto 24px; }
.search input { width: 100%; padding: 10px 16px; border: var(--line); border-radius: 14px; background: var(--paper); font: inherit; color: inherit; }

.shelf { margin-bottom: 40px; --c: #3f7bf6; }
.shelf-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.shelf-head h2 { padding: 3px 15px 4px; border: 3px solid var(--c); border-radius: 12px; background: var(--paper); box-shadow: 0 4px 0 var(--c); color: var(--ink); font: 700 25px/1.2 var(--head); transform: rotate(-1deg); }
.shelf-head::after { content: ''; flex: 1; height: 4px; border-radius: 4px; background: var(--c); opacity: .22; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 24px 22px; }

.card {
  position: relative; display: flex; flex-direction: column; border: var(--line); border-radius: 22px; overflow: hidden;
  background: var(--paper); box-shadow: 0 7px 0 var(--ink); transition: transform .14s, box-shadow .14s;
}
.card-link { display: flex; flex: 1; flex-direction: column; text-decoration: none; }
.grid .card:nth-child(3n + 1) { --tilt: -.6deg; }
.grid .card:nth-child(3n + 2) { --tilt: .5deg; }
.card:hover { transform: translateY(-4px) rotate(var(--tilt, 0deg)); box-shadow: 0 11px 0 var(--ink); }
.card:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--ink); }
.cover { aspect-ratio: 8 / 5; width: 100%; object-fit: cover; border-bottom: var(--line); background: var(--sky-light); transition: transform .3s; }
.cover-box { overflow: hidden; }
.card:hover .cover { transform: scale(1.04); }
.cover.blank { display: grid; place-items: center; background: var(--c); color: #fff; font: 700 54px/1 var(--head); }
.body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 12px 16px 16px; }
.title { font: 700 22px/1.2 var(--head); }
.desc { flex: 1; color: var(--ink-soft); font-size: 16px; line-height: 1.4; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { padding: 1px 10px; border-radius: 9px; background: var(--sky-light); font-size: 14px; font-weight: 500; }

.new { position: absolute; top: 10px; right: -3px; z-index: 2; padding: 3px 14px 4px 12px; border: var(--line); border-radius: 12px 0 0 12px; background: #c8321f; color: #fff; font: 700 17px/1.1 var(--head); }

.fav {
  position: absolute; top: 10px; left: 10px; z-index: 2; display: grid; place-items: center; width: 42px; height: 42px;
  border: var(--line); border-radius: 50%; background: var(--paper); padding: 0;
}
.fav svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.4; }
.fav[aria-pressed='true'] { background: #ffe1de; }
.fav[aria-pressed='true'] svg { fill: var(--coral); }

.card.soon { border-style: dashed; box-shadow: none; }
.card.soon:hover, .card.soon:active { transform: none; box-shadow: none; }
.card.soon:hover .cover { transform: none; }
.card.soon .card-link { opacity: .5; }
.soon-tag { position: absolute; top: 38%; left: 50%; z-index: 2; padding: 6px 22px 7px; border: var(--line); border-radius: 14px; background: var(--sun); font: 700 24px/1.1 var(--head); transform: translate(-50%, -50%) rotate(-4deg); }

/* המשחק המומלץ */
.featured { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; margin-bottom: 40px; border: var(--line); border-radius: 26px; overflow: hidden; background: var(--sun); box-shadow: 0 8px 0 var(--ink); text-decoration: none; transition: transform .14s, box-shadow .14s; }
.featured:hover { transform: translateY(-3px); box-shadow: 0 11px 0 var(--ink); }
.featured:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--ink); }
.featured img { width: 100%; height: 100%; min-height: 230px; object-fit: cover; border-inline-start: var(--line); }
.featured .info { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 22px 26px; }
.featured .label { font: 600 17px/1 var(--head); }
.featured h2 { font: 700 clamp(30px, 4.6vw, 44px)/1.08 var(--head); }
.featured p { line-height: 1.4; }
.featured .go { margin-top: 8px; padding: 9px 22px; border-radius: 14px; background: var(--ink); color: #fff; font: 700 19px/1.1 var(--head); }

/* שורות אישיות */
.row { display: flex; gap: 14px; padding: 2px 2px 10px; overflow-x: auto; scrollbar-width: thin; }
.mini { flex: 0 0 150px; border: var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); box-shadow: 0 4px 0 var(--ink); text-decoration: none; transition: transform .12s; }
.mini:hover { transform: translateY(-2px); }
.mini img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-bottom: var(--line); }
.mini span { display: block; padding: 6px 10px 7px; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty { padding: 30px 0; text-align: center; color: var(--ink-soft); }

/* ----- הבטחה להורים ----- */
.promise { padding: 34px 16px 36px; background: var(--ink); color: #fff; text-align: center; }
.promise h2 { font: 700 30px/1.2 var(--head); }
.promise ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; max-width: 980px; margin: 22px auto; padding: 0; list-style: none; }
.promise strong { display: block; color: var(--sun); font: 600 21px/1.2 var(--head); }
.promise span { font-size: 15.5px; color: #d8def5; }
.parents-btn { padding: 9px 26px; border: 3px solid #fff; border-radius: 14px; background: transparent; color: #fff; font: 600 19px/1.1 var(--head); }
.parents-btn:hover { background: #fff; color: var(--ink); }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; padding: 14px 16px; background: var(--ink); border-top: 1px solid #36447f; color: #c9d1ee; font-size: 14.5px; }
.link-btn { padding: 2px; border: 0; background: none; color: inherit; text-decoration: underline; }

/* ----- בחירת הסביבון ----- */
.pick { position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 16px; background: rgba(29, 42, 91, .88); color: #fff; animation: fade .2s both; }
.pick[hidden] { display: none; }
.pick img { width: min(420px, 88vw); aspect-ratio: 8 / 5; object-fit: cover; border: 4px solid #fff; border-radius: 22px; animation: pop .4s cubic-bezier(.2, 1.5, .4, 1) both; }
.pick p { font: 700 30px/1.2 var(--head); text-align: center; }
@keyframes pop { from { transform: scale(.6) rotate(-6deg); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.cheer-title { color: var(--sun); font: 700 clamp(38px, 8vw, 56px)/1.1 var(--head); }
.pick .cheer-text { max-width: 560px; font: 500 22px/1.4 var(--body); }

/* ----- בחירת הזמן ----- */
.quote { margin-top: 4px; color: var(--ink-soft); font-weight: 500; }
.pick-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.pick-chip { padding: 11px 6px; border: var(--line); border-radius: 13px; background: var(--paper); font: 600 18px/1.1 var(--head); }
.pick-chip[aria-pressed='true'] { background: var(--ink); color: #fff; }
.lock-note { margin-top: 8px; color: var(--ink-soft); font-size: 15.5px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.auth-tabs .pick-chip { font-size: 16px; }
.checks { display: grid; gap: 6px; }
.privacy { font-size: 15px; }
.privacy summary { cursor: pointer; font-weight: 500; }
.gate-pass { display: grid; gap: 3px; width: 100%; font-size: 17px; font-weight: 500; }
.gate .gate-pass input { width: 100%; text-align: start; }
.account-email { text-align: end; font-weight: 500; }
#endBreak { margin-top: 10px; }
.stars-line { margin-top: 14px; padding: 8px 12px; border-radius: 12px; background: #fff0c4; font-weight: 500; }

/* ----- הפסקה ----- */
.resting > :not(.rest):not(dialog):not(.a11y) { display: none !important; }
.rest { position: fixed; inset: 0; z-index: 45; display: grid; overflow-y: auto; padding: 22px 16px; background: linear-gradient(#8fd6ff, #d9f2ff 58%, #a8e28a 58.2%, #7ccb5f); }
.rest-card { display: grid; justify-items: center; gap: 8px; width: min(600px, 100%); margin: auto; padding: 24px 22px; border: var(--line); border-radius: 26px; background: var(--cream); box-shadow: 0 8px 0 var(--ink); text-align: center; }
.rest-card h1 { font: 700 clamp(40px, 8vw, 58px)/1.1 var(--head); }
.rest-card h2 { margin-top: 10px; font: 600 23px/1.2 var(--head); }
.rest-stars { color: #c47a00; font: 700 30px/1.1 var(--head); }
.rest-points { color: var(--ink-soft); font-size: 15px; }
.rest-line { font-size: 20px; font-weight: 500; line-height: 1.4; }
.rest-clock { display: grid; gap: 2px; margin-top: 6px; padding: 8px 26px 10px; border-radius: 16px; background: var(--ink); color: #fff; }
.rest-clock span { color: var(--sun); font: 700 38px/1.1 var(--head); direction: ltr; }
.rest-clock small { font-size: 14px; }
.ideas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin: 4px 0 0; padding: 0; list-style: none; }
.ideas li { padding: 10px 8px; border: 2px solid var(--ink); border-radius: 13px; background: var(--paper); font-weight: 500; line-height: 1.25; }
.rest-actions { justify-content: center; }

/* ----- סגור בשבת ובחג ----- */
.locked > :not(.lock):not(.a11y) { display: none !important; }
.lock { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: linear-gradient(#1d2a5b, #3b3f8f 70%, #7c5c9e); color: #fff; text-align: center; }
.lock[hidden] { display: none; }
.lock-card { display: grid; justify-items: center; gap: 10px; max-width: 520px; }
.lock h1 { font: 700 clamp(44px, 9vw, 68px)/1.1 var(--head); color: var(--sun); }
.lock p { font-size: 20px; line-height: 1.5; }

/* ----- להורים ----- */
.parents { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 20px 24px 26px; border: var(--line); border-radius: 22px; background: var(--cream); color: var(--ink); }
.parents::backdrop { background: rgba(29, 42, 91, .6); }
.parents h2 { font: 700 30px/1.2 var(--head); }
.parents h3 { margin-top: 20px; font: 600 21px/1.2 var(--head); }
.parents p { margin-top: 4px; }
.mic-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 16px; }
.close-row { float: left; }
.close { width: 38px; height: 38px; border: var(--line); border-radius: 50%; background: var(--paper); font-weight: 700; }
.gate form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.gate label { font-size: 22px; font-weight: 700; }
.gate input { width: 80px; padding: 6px 10px; border: var(--line); border-radius: 10px; font: inherit; text-align: center; }
.err { color: #c6302a; font-weight: 500; }
.primary { display: inline-block; padding: 9px 22px; border: var(--line); border-radius: 13px; background: var(--sun); font: 600 18px/1.2 var(--head); text-decoration: none; box-shadow: 0 4px 0 var(--ink); }
.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.contact { display: grid; gap: 10px; margin-top: 8px; }
.contact label { display: grid; gap: 3px; font-weight: 500; }
.contact input:not(.vh), .contact textarea { width: 100%; padding: 9px 12px; border: var(--line); border-radius: 10px; background: var(--paper); font: inherit; color: inherit; }
.contact select { width: 100%; padding: 9px 12px; border: var(--line); border-radius: 10px; background: var(--paper); font: inherit; color: inherit; }
.contact .rule-check { display: flex; align-items: center; gap: 8px; }
.contact .rule-check input { flex: none; width: 22px; height: 22px; }
.contact .primary { justify-self: start; }
.status { min-height: 1.5em; font-weight: 500; }

/* ----- תפריט נגישות ----- */
.a11y { position: fixed; bottom: 14px; left: 14px; z-index: 60; }
.a11y-btn { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: #1f4fd8; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.a11y-btn svg { fill: currentColor; }
.a11y-panel { position: absolute; bottom: 62px; left: 0; display: grid; gap: 6px; width: 210px; padding: 12px; border: var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); }
.a11y-title { font: 700 20px/1.2 var(--head); }
.a11y-opt { padding: 9px 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font-weight: 500; text-align: right; }
.a11y-opt[aria-pressed='true'] { background: var(--ink); color: #fff; }
.a11y-link { padding: 4px 2px; font-weight: 500; }

.a11y-big body { zoom: 1.25; }
.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; outline: 2px solid currentColor; outline-offset: 2px; }
.a11y-still *, .a11y-still *::before, .a11y-still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.a11y-contrast { --ink: #000; --ink-soft: #000; --cream: #fff; --paper: #fff; --sky-light: #fff; --sun: #ffe100; }
.a11y-contrast body, .a11y-contrast .hero, .a11y-contrast .rest { background: #fff; }
.a11y-contrast .hills, .a11y-contrast .cloud, .a11y-contrast .sun { display: none; }
.a11y-contrast .timebar, .a11y-contrast .stars-line { background: #fff; border-color: #000; }
.a11y-contrast .promise, .a11y-contrast .foot, .a11y-contrast .lock, .a11y-contrast .rest-clock { background: #000; color: #fff; }
.a11y-contrast .promise span, .a11y-contrast .foot { color: #fff; }
.a11y-contrast .card, .a11y-contrast .featured, .a11y-contrast .rest-card { box-shadow: none; }

/* ----- הצהרת נגישות ----- */
.statement-in { max-width: 760px; margin: 0 auto; padding: 22px 16px 90px; }
.statement-in h1 { margin-top: 12px; font: 700 clamp(36px, 7vw, 48px)/1.1 var(--head); }
.statement-in h2 { margin: 26px 0 6px; font: 700 25px/1.2 var(--head); }
.statement-in p { margin-top: 8px; }
.statement-in ul { margin: 8px 0 0; padding-inline-start: 22px; }
.statement-in li { margin-top: 6px; }
.statement-date { color: var(--ink-soft); }
.contact-lines { list-style: none; padding: 0 !important; font-weight: 500; }
.back-home { font-weight: 500; }

@media (max-width: 680px) {
  .hero { padding: 54px 16px 96px; }
  .hero-in { gap: 12px; }
  .logo { width: 86px; }
  .sun { top: -20px; left: -24px; width: 64px; height: 64px; }
  .c1 { top: auto; bottom: 86px; right: -46px; transform: scale(.6); }
  .c2, .c3 { display: none; }
  .hills { height: 92px; }
  .spin-btn { font-size: 19px; padding: 11px 20px; }
  .timebar { flex-wrap: wrap; padding: 12px 14px; }
  .tb-icon { width: 44px; height: 44px; }
  .tb-actions { flex-basis: 100%; }
  .featured { grid-template-columns: 1fr; }
  .featured img { min-height: 0; aspect-ratio: 8 / 5; border-inline-start: 0; border-bottom: var(--line); }
  .featured .info { padding: 16px 18px 20px; }
}

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