/* ---------- תפריט המבורגר ותפריט צד ---------- */
.burger {
  position: fixed; z-index: 35; inset-inline-start: max(14px, env(safe-area-inset-right)); top: calc(14px + env(safe-area-inset-top));
  display: grid; gap: 5px; width: 52px; height: 52px; place-content: center; cursor: pointer;
  background: rgba(11, 11, 12, .82); border: 1px solid rgba(212, 173, 90, .6); border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25); backdrop-filter: blur(6px);
}
.burger span { display: block; width: 24px; height: 2px; background: var(--gold-2); border-radius: 2px; }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(8, 14, 28, .55); }
.drawer {
  position: fixed; z-index: 50; inset-block: 0; inset-inline-start: 0; width: min(340px, 86vw);
  background: var(--navy); color: #fff; overflow-y: auto; padding: 0 0 10px;
  padding-top: env(safe-area-inset-top); box-shadow: 0 0 40px rgba(0, 0, 0, .35);
  transform: translateX(100%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s;
}
.drawer.open { transform: none; visibility: visible; transition: transform .3s var(--ease); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid rgba(196, 154, 60, .35); }
.drawer-name { font: 700 1.3rem var(--serif); }
.drawer-name span { color: var(--gold-2); font-size: .7em; }
.drawer-close { background: none; border: 0; color: rgba(255, 255, 255, .8); font-size: 1.2rem; min-width: 44px; min-height: 44px; cursor: pointer; }
.d-fold { border-top: 1px solid var(--line); }
.d-group {
  display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer;
  padding: 18px 22px;
}
.d-group::-webkit-details-marker { display: none; }
.d-group::after { content: "▾"; transition: transform .2s var(--ease); }
.d-fold[open] > .d-group::after { transform: rotate(180deg); }
.d-fold[open] { padding-bottom: 8px; }
.d-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 22px; text-decoration: none; font-size: 1.02rem; }
.d-link:hover, .d-link:focus-visible { background: rgba(255, 255, 255, .06); }
.d-link.sub { padding-inline-start: 34px; }
.d-top { font: 700 1.1rem var(--serif); padding-block: 18px; border-top: 1px solid var(--line); }
.d-inner { padding: 2px 0 10px; }
.d-item { padding-inline-start: 34px; }
.d-sub { border-top: 0; }
.d-subgroup {
  display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer;
  padding: 11px 22px 11px 22px; padding-inline-start: 34px; font-weight: 600; color: var(--ink);
}
.d-subgroup::-webkit-details-marker { display: none; }
.d-subgroup::after { content: "▾"; color: var(--gold); font-size: .85em; transition: transform .2s var(--ease); }
.d-sub[open] > .d-subgroup::after { transform: rotate(180deg); }
.d-sub[open] > .d-subgroup { color: var(--gold-2); }
.d-leaf { padding-inline-start: 52px; font-size: .96rem; color: var(--ink-soft); }
.d-leaf:hover { color: #fff; }
.d-count { color: rgba(255, 255, 255, .55); font-size: .85rem; }


/* כל השורות בתפריט באותו גופן, גודל וצבע — ההבדל רק בהזחה ובחץ */
.drawer .d-link, .drawer .d-group, .drawer .d-subgroup { font: 500 1.05rem var(--sans); color: var(--ink); }
.drawer .d-top { padding-block: 18px; border-top: 1px solid var(--line); }
.drawer .d-fold > .d-group::after, .drawer .d-subgroup::after { color: var(--gold); }
.drawer .d-fold[open] > .d-group, .drawer .d-sub[open] > .d-subgroup { color: var(--ink); }
.drawer .d-leaf { color: var(--ink); }

/* הזמנת הרב — כפתור עם מסגרת זהב בתפריט (במקום שורת האייקונים, יקיר 8.11) */
/* מעבר לאתר של הרב השני (האב / הבן): עיגול עם תמונה והשם, בלי מסגרת (יקיר, 11.11) — לפי sister בקובץ ההגדרות */
.d-sister {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin: auto 22px 0; padding: 30px 0 8px;
  color: #fff; font-weight: 700; font-size: 1.05rem; text-decoration: none;
}
.d-sister[hidden] { display: none; }
.d-sister:hover .d-sister-name, .d-sister:focus-visible .d-sister-name { color: var(--gold-2); }
.d-sister-img { flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 1.5px solid var(--gold); }
.d-sister-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

/* התפריט כעמודה: הקישורים למעלה, המעבר לאתר השני אחריהם, וקרדיט הבונה בתחתית */
.drawer { display: flex; flex-direction: column; }
.drawer .d-group, .drawer .d-top { font-size: 1.1rem; }
/* קרדיט הסטודיו (yakir-studio-credit): שורה אחת קטנה בתחתית התפריט, בכל עמוד */
.d-credit {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 0 22px; padding: 18px 0 calc(6px + env(safe-area-inset-bottom));
  color: var(--ink-soft); font-size: .78rem; line-height: 1; word-spacing: .12em; text-decoration: none; opacity: .75;
  transition: opacity .2s var(--ease);
}
.d-credit:hover, .d-credit:focus-visible { opacity: 1; }
.d-credit-logo { height: 13px; width: auto; display: block; }
.d-credit-sep { width: 1px; height: 11px; background: currentColor; opacity: .45; }

/* בזמן שסרטון או שיעור מתנגן בעמוד הצפייה — כפתור התפריט מוסתר כדי לא לכסות את הנגן; חוזר בהשהיה */
.burger { transition: opacity .25s var(--ease); }
body.on-watch:has(.fp.fp-docked[data-state="playing"]) .burger,
body.on-watch:has(.a-stage.is-playing) .burger { opacity: 0; pointer-events: none; }

/* עמוד "הגדרות" (#/settings): שורה לכל הגדרה — מתג או בחירה; מתג ההתראות רק בתוך האפליקציה (js/push.js) */
.set-card { max-width: 560px; margin: 8px auto 0; padding: 4px 20px; border: 1px solid var(--line); border-radius: 18px; }
.d-set { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 0; }
.d-set + .d-set { border-top: 1px solid var(--line); }
.d-set-col { flex-direction: column; align-items: stretch; gap: 10px; }
.d-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.d-chips button {
  min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: none;
  color: var(--ink); font: 500 .92rem var(--sans); cursor: pointer;
}
.d-chips button[aria-checked="true"] { border-color: var(--gold); color: var(--gold-2); background: rgba(212, 173, 90, .1); }
.d-chips button:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.d-push[hidden] { display: none; }
.d-push[hidden] + .d-set { border-top: 0; }
.d-push-text { display: grid; gap: 2px; font: 500 1.02rem var(--sans); color: var(--ink); }
.d-push-note { color: var(--ink-soft); font-size: .82rem; }
.d-switch {
  flex: none; position: relative; width: 52px; height: 30px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--gold); background: none; padding: 0; transition: background .2s var(--ease);
}
.d-switch span {
  position: absolute; top: 3px; inset-inline-start: 3px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--ink-soft); transition: inset-inline-start .2s var(--ease), background .2s var(--ease);
}
.d-switch[aria-checked="true"] { background: rgba(212, 173, 90, .22); }
.d-switch[aria-checked="true"] span { inset-inline-start: 25px; background: var(--gold-2); }
.d-switch:disabled { opacity: .6; cursor: progress; }
.d-switch:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.d-switch::before { content: ""; position: absolute; inset: -8px; } /* אזור לחיצה של 46 פיקסלים */

/* "ניהול" — שורה רגילה של התפריט, בצבע שקט, מעל הקרדיט (js/owner.js) */
/* "ניהול" — מתחת לשורת "הגדרות" */
.drawer .d-admin { color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.drawer .d-admin:hover, .drawer .d-admin:focus-visible { color: var(--ink); }
.d-admin-note { display: block; padding: 8px 22px 0; color: var(--gold-2); font-size: .85rem; }
.d-admin-note:empty { display: none; }

/* עוזר ההוספה — כפתור צף משמאל למעלה, מול כפתור התפריט (רק למחוברים ללוח, js/owner.js) */
.assist-fab {
  position: fixed; z-index: 35; inset-inline-end: max(14px, env(safe-area-inset-left)); top: calc(14px + env(safe-area-inset-top));
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: var(--gold-2);
  background: rgba(11, 11, 12, .82); border: 1px solid rgba(212, 173, 90, .6); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); backdrop-filter: blur(6px);
  transition: opacity .25s var(--ease);
}
.assist-fab:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
body.on-watch:has(.fp.fp-docked[data-state="playing"]) .assist-fab,
body.on-watch:has(.a-stage.is-playing) .assist-fab { opacity: 0; pointer-events: none; }
.assist-tip {
  position: fixed; z-index: 36; inset-inline-end: max(14px, env(safe-area-inset-left)); top: calc(78px + env(safe-area-inset-top));
  width: min(290px, calc(100vw - 28px)); padding: 14px 16px 12px; border-radius: 16px; background: #16130d; border: 1px solid var(--gold);
  color: var(--ink); font-size: .93rem; line-height: 1.5; box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  animation: tip-in .35s var(--ease) both;
}
.assist-tip::before {
  content: ""; position: absolute; top: -7px; inset-inline-end: 20px; width: 12px; height: 12px; background: #16130d;
  border-top: 1px solid var(--gold); border-inline-start: 1px solid var(--gold); transform: rotate(45deg);
}
.assist-tip b { color: var(--gold-2); }
.assist-tip p { margin: 0 0 10px; }
.assist-tip button { border: 0; border-radius: 999px; padding: 8px 18px; background: var(--gold); color: var(--navy); font: 700 .9rem var(--sans); cursor: pointer; }
@keyframes tip-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .assist-tip { animation: none; } }
