:root {
  --navy: #17214b;
  --heading: #0b4f6c;
  --yellow: #fecd05;
  --orange: #f7941e;
  --taken: #fff500;
  --red: #dc2626;
  --burgundy: #690021;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #090f35; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--navy); font: 17px/1.5 Heebo, Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
h1, h2 { font-family: Rubik, Heebo, sans-serif; line-height: 1.2; text-wrap: balance; }
p { text-wrap: pretty; }

/* הדף כולו בנוי כמו הכרזה */
.poster {
  max-width: 1400px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: auto;
  display: flex;
  flex-direction: column;
  background: var(--yellow);
}
.hero { position: relative; margin: 0; aspect-ratio: 1892 / 800; flex: none; overflow: hidden; }
.hero picture, .hero img.banner { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero .brand, .hero .bsd { display: none; }
.content {
  flex: 1;
  margin-top: -1px;
  padding: 0 32px 36px;
  background: linear-gradient(var(--yellow), #fbb216 48%, var(--orange));
}
.intro { margin: 0 0 18px; text-align: center; font: 600 clamp(19px, 2.2vw, 27px)/1.3 Rubik, sans-serif; text-wrap: balance; }
.returning { margin: 0 auto 16px; text-align: center; }
a { color: inherit; }
.loading { text-align: center; padding: 50px 0; }
.footer { display: flex; justify-content: center; gap: 22px; padding-top: 30px; font-size: 14px; }

/* הלוח */
.board {
  display: grid;
  grid-template-columns: 78px repeat(var(--days), minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.day h2 { margin: 0 0 8px; text-align: center; color: var(--heading); font-size: clamp(18px, 2.4vw, 33px); font-weight: 600; }
.date-card { display: flex; flex-direction: column; align-items: center; padding: 10px 4px 8px; background: #fff; }
.date-card strong { font: 300 clamp(48px, 7vw, 98px)/1.15 Heebo, sans-serif; }
.date-card span { font-size: clamp(17px, 2.1vw, 29px); line-height: 1.2; }
.date-card em { margin-top: 5px; color: #c96f00; font: 600 clamp(14px, 1.5vw, 20px)/1.3 Rubik, sans-serif; }
.time { display: grid; place-items: center; font-size: clamp(19px, 2.3vw, 31px); }
.slot {
  position: relative;
  min-width: 0;
  min-height: 94px;
  padding: 7px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #fff;
  border-radius: 0;
  background: transparent;
  text-align: center;
  line-height: 1.2;
  overflow-wrap: anywhere;
  transition: background .2s, box-shadow .2s;
}
.slot.free .hint { opacity: 0; font-weight: 600; transition: opacity .2s; }
.slot.free:hover, .slot.free:focus-visible { background: rgb(255 255 255 / .27); }
.slot.free:hover .hint, .slot.free:focus-visible .hint { opacity: 1; }
.slot.selected { background: rgb(255 255 255 / .6); box-shadow: 0 0 0 4px #fff, 0 0 26px 8px rgb(255 255 255 / .7); }
.slot.taken { border-color: var(--taken); background: var(--taken); color: #111; }
.slot.taken b { color: var(--red); font: 800 clamp(16px, 1.8vw, 25px)/1.15 Rubik, sans-serif; }
.slot.taken span { font-size: clamp(14px, 1.4vw, 20px); }
.slot.taken i { margin-top: 2px; font: 600 12px/1.2 Rubik, sans-serif; color: #5e5200; }
.slot.mine { outline: 4px solid var(--navy); }
.slot.blocked, .slot.closed { border-color: rgb(255 255 255 / .4); background: rgb(90 45 0 / .1); color: #61400a; }
button.slot.blocked:hover, button.slot.taken:hover { filter: brightness(.96); }
.tabs, .active-day { display: none; }
.spark { position: fixed; z-index: 100; pointer-events: none; color: #fff; font-size: 25px; text-shadow: 0 0 9px #fff500; }

/* חלוניות וטפסים */
.panel { max-width: 720px; margin: 0 auto; padding: 26px; background: #fff; border-radius: 8px; text-align: center; scroll-margin-top: 12px; }
.panel h1 { margin: 0 0 8px; font-size: clamp(25px, 4vw, 36px); outline: none; }
.move { margin-top: 30px; }
.dialog {
  width: min(560px, calc(100% - 22px));
  max-height: calc(100% - 22px);
  padding: 26px 26px 22px;
  border: 0;
  border-top: 8px solid var(--orange);
  border-radius: 8px;
  color: var(--navy);
}
.dialog::backdrop { background: rgb(9 15 53 / .72); }
.dialog h2 { margin: 0 34px 10px 0; padding-left: 34px; margin-right: 0; }
.close { position: absolute; top: 8px; left: 8px; width: 44px; height: 44px; border: 0; background: none; font-size: 32px; line-height: 1; }
.chosen { margin: 0 0 14px; padding: 8px 12px; background: var(--taken); font-weight: 600; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.fields label, label.field { display: flex; flex-direction: column; gap: 3px; font-size: 15px; font-weight: 600; text-align: start; }
.fields .wide { grid-column: 1 / -1; }
.fields .wide-2 { grid-column: span 2; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  border: 1.5px solid #aab1c5;
  border-radius: 4px;
  background: #fff;
  font-weight: 400;
}
input[type=tel] { text-align: right; }
input[type=checkbox] { width: 22px; min-height: 22px; accent-color: var(--orange); }
textarea { resize: vertical; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.privacy { margin: 10px 0 0; color: #535c78; font-size: 13.5px; }
.error { color: #b00020; font-weight: 600; }
.error:empty { display: none; }
.prewrap { white-space: pre-line; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 16px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 20px;
  border: 1.5px solid var(--navy);
  border-radius: 5px;
  background: #fff;
  color: var(--navy);
  font: 600 16px/1.2 Rubik, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { background: #f1f3f9; }
.btn.primary { border-color: var(--navy); background: var(--navy); color: #fff; }
.btn.primary:hover { background: #26346e; }
.btn.whatsapp { border-color: #116b3c; background: #116b3c; color: #fff; }
.btn.danger { border-color: #b00020; color: #b00020; }
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 18px 0; }
.summary div { padding: 10px; background: #fff8c5; }
.summary dt { color: var(--heading); font-size: 14px; }
.summary dd { margin: 0; font: 700 19px/1.3 Rubik, sans-serif; }
.stack { align-items: flex-start; }
.calendar summary { list-style: none; }
.calendar summary::-webkit-details-marker { display: none; }
.calendar div { display: flex; flex-direction: column; border: 1px solid #aab1c5; margin-top: 4px; }
.calendar div a { padding: 11px 14px; }
.personal { margin: 22px 0 16px; padding-top: 12px; border-top: 1px solid #dde1ec; }
.personal h2 { margin: 0; font-size: 20px; }
.personal p { margin: 3px 0; font-size: 15px; }
.flame {
  width: 34px; height: 34px; margin: 8px auto 18px;
  border-radius: 50% 0 50% 50%;
  background: linear-gradient(45deg, var(--orange), var(--taken));
  transform: rotate(-45deg);
  box-shadow: 0 0 22px var(--yellow);
}
.toast {
  position: fixed;
  z-index: 110;
  inset: auto 12px 16px;
  width: fit-content;
  max-width: 520px;
  margin: auto;
  padding: 12px 18px;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  text-align: center;
  box-shadow: 0 5px 24px rgb(0 0 0 / .25);
}
.toast.bad { background: var(--burgundy); }

@media (max-width: 1050px) {
  .content { padding-inline: 16px; }
  .board { gap: 10px; grid-template-columns: 62px repeat(var(--days), minmax(0, 1fr)); }
}

/* בנייד: לשונית לכל יום */
@media (max-width: 720px) {
  .hero { aspect-ratio: 1050 / 800; }
  .hero .brand {
    position: absolute; top: 10px; left: 10px;
    display: flex; flex-direction: column; gap: 2px;
    color: #fff; font: 700 10px/1.15 Rubik, sans-serif; text-align: center;
  }
  .hero .brand img { width: 72px; height: auto; }
  .hero .bsd { position: absolute; top: 8px; right: 10px; display: block; color: #fff; font-size: 13px; }
  .content { padding: 0 12px 24px; }
  .intro { margin: 4px 0 14px; }
  .tabs { display: flex; gap: 5px; overflow-x: auto; padding: 2px; }
  .tab {
    flex: 1 0 60px;
    display: flex; flex-direction: column; align-items: center;
    padding: 6px 2px;
    border: 0;
    border-bottom: 5px solid transparent;
    background: rgb(255 255 255 / .58);
    line-height: 1.2;
    font-size: 13px;
  }
  .tab strong { font-size: 30px; font-weight: 400; }
  .tab small { font-size: 11px; white-space: nowrap; }
  .tab[aria-selected=true] { border-bottom-color: var(--navy); background: #fff; }
  .active-day { display: block; margin: 14px 0 10px; text-align: center; color: var(--heading); font: 700 18px/1.3 Rubik, sans-serif; }
  .board { grid-template-columns: 62px minmax(0, 1fr); gap: 9px; }
  .board .corner, .board .day, .board .slot { display: none; }
  .board .slot.is-active { display: flex; min-height: 72px; }
  .time { font-size: 21px; }
  .slot.free .hint { opacity: .85; }
  .slot.taken b { font-size: 21px; }
  .slot.taken span { font-size: 16px; }
  .panel { padding: 20px 14px; }
  .dialog { padding: 22px 16px 16px; }
  .fields { gap: 8px; }
  .summary dd { font-size: 17px; }
}

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