/* תוספות: כפתורי אהבתי ותור, הצעת חיפוש, בדיקת התקינות המקובצת בניהול,
   כרטיס ה־AI, גרפים של הסטטיסטיקה המעמיקה, והתראות. נשען על הטוקנים של
   rosh.css, ולכן עובד במצב כהה ובמצב בהיר. */

#main:focus { outline: none; }

/* ---------- אהבתי ---------- */
.like-btn[aria-pressed="true"] { color: var(--pink); border-color: color-mix(in srgb, var(--pink) 55%, transparent); }
.like-count { font-variant-numeric: tabular-nums; opacity: .75; margin-inline-start: 2px; }
[data-queue][aria-pressed="true"], [data-later][aria-pressed="true"] { border-color: var(--gold); }

/* ---------- "אולי התכוונתם ל…" ---------- */
.link-btn { padding: 0; border: 0; background: none; color: var(--gold-ink); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- ניהול: בדיקת תקינות מקובצת ---------- */
.health-groups { display: grid; gap: 10px; }
.health-group { border: 1px solid var(--border); border-radius: var(--radius-13); padding: 12px 14px; background: rgb(var(--fg-rgb, 255 255 255) / .03); }
.hg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hg-head > b { font-size: 22px; font-variant-numeric: tabular-nums; min-width: 2.2ch; color: var(--gold-ink); }
.hg-head > span:not(.cue-hint) { flex: 1; font-weight: 800; }
.hg-head .cue-hint { display: inline-flex; align-items: center; gap: 6px; }
.health-group details { margin-top: 6px; }
.health-group summary { cursor: pointer; color: var(--muted); font-size: 12.5px; font-weight: 700; }

/* ---------- ניהול: AI ---------- */
.ai-result { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-13); border: 1px solid var(--gold-tint); background: var(--gold-selected); }
.ai-result p { margin: 0 0 10px; line-height: 1.7; }
.ai-transcript { margin-top: 14px; }
.ai-transcript summary { cursor: pointer; font-weight: 800; }
.transcript-text { margin-top: 8px; max-height: 360px; overflow: auto; white-space: pre-wrap; line-height: 1.8; font-size: 14px; padding: 12px 14px; border-radius: var(--radius-10); border: 1px solid var(--border); background: rgb(var(--fg-rgb, 255 255 255) / .03); }
.upload-status .notice-spinner { display: inline-block; vertical-align: middle; }

/* ---------- ניהול: סטטיסטיקה מעמיקה ---------- */
.hbars { display: grid; gap: 6px; margin-top: 8px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.hbar i { display: block; height: 10px; width: var(--w); min-width: 2px; border-radius: 99px; background: linear-gradient(90deg, var(--gold-deep), var(--gold-ink)); }
.hbar b { font-variant-numeric: tabular-nums; color: var(--gold-ink); }
.bars.hours, .bars.retention { height: 110px; gap: 2px; }
.bars.retention .bar i { background: linear-gradient(180deg, var(--cyan), color-mix(in srgb, var(--cyan) 35%, transparent)); }
.notify-check { margin-inline-start: 6px; }
.push-form .actions { margin-top: 12px; }

@media (max-width: 760px) {
  .hbar { grid-template-columns: minmax(80px, 38%) 1fr auto; }
  .bars.hours .bar:nth-child(even) small { visibility: visible; }
}

/* ---------- תגובות המאזינים בדף התוכנית ---------- */
.comments { border-top: 1px solid var(--divider); }
.comments .count { font-size: .6em; color: var(--muted); font-variant-numeric: tabular-nums; }
.comment-form { display: grid; gap: 10px; margin: 6px 0 18px; }
.comment-form textarea { min-height: 84px; }
.comment-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.comment-login { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-13); margin: 6px 0 18px; }
.comment-login p { margin: 0; flex: 1; min-width: 200px; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.comment-list.mine { margin-bottom: 14px; }
.comment { padding: 14px 16px; border-radius: var(--radius-13); border: 1px solid var(--border); background: rgb(var(--fg-rgb, 255 255 255) / .03); }
.comment.pinned { border-color: var(--gold); background: var(--gold-selected); }
.comment.pending { opacity: .75; border-style: dashed; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-head small { color: var(--muted); font-size: 12px; margin-inline-start: auto; }
.comment p { margin: 8px 0 0; line-height: 1.7; white-space: pre-line; }
.comment-reply { margin-top: 10px; padding: 10px 12px; border-inline-start: 3px solid var(--gold); border-radius: 0 10px 10px 0; background: rgb(var(--fg-rgb, 255 255 255) / .04); }
.comment-reply span { font-size: 12px; font-weight: 800; color: var(--gold-ink); }
.comment-reply p { margin-top: 4px; }
.moment-chip { font: inherit; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--border-strong); background: none; color: var(--text); cursor: pointer; direction: ltr; }
.moment-chip:hover { border-color: var(--gold); }
.private-msg summary { cursor: pointer; font-weight: 800; color: var(--muted); padding: 10px 0; }
/* רגעים שמאזינים הגיבו עליהם — על פס ההתקדמות בנגן */
.scrub .markers { position: absolute; inset: 0; pointer-events: none; }
.scrub .markers i { position: absolute; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 2px var(--panel-solid); }

/* ---------- ניהול: גרירת קבצים, השלמת תאריכים, מה ישתנה, בדיקת איות, תגובות ---------- */
#editor.drop-ready { outline: 3px dashed var(--gold); outline-offset: 6px; border-radius: var(--radius-17); }
#editor.drop-ready::before { content: "שחררו כאן — הקלטה או תמונה"; position: sticky; top: 90px; z-index: 5; display: block; margin: 0 auto 10px; width: fit-content; padding: 8px 16px; border-radius: 99px; background: var(--gold); color: #1a1405; font-weight: 800; }
.dates-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dates-list li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); }
.dates-list li.done { border-color: var(--success-border); background: var(--success-bg); }
.dates-list li.dates-season { display: block; border: 0; padding: 12px 2px 2px; font-weight: 800; color: var(--gold-ink); }
.dates-list .num { font-weight: 900; text-align: center; color: var(--muted); }
.dates-list .txt { display: grid; min-width: 0; }
.dates-list .txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dates-list .txt small { color: var(--muted); font-size: 12px; }
.dates-list input[type="date"] { min-height: 40px; padding: 4px 10px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--field-bg, transparent); color: var(--text); }
.diff { margin-top: 12px; }
.diff summary { cursor: pointer; font-weight: 800; }
.diff-list { margin: 8px 0 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 13.5px; }
.diff-list ul { margin: 2px 0 0; padding-inline-start: 16px; color: var(--muted); }
.proof-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.proof-list li { padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; display: grid; gap: 6px; }
.proof-changes { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13.5px; }
.proof-changes del { color: var(--error); text-decoration: line-through; }
.proof-changes ins { color: var(--success); text-decoration: none; font-weight: 800; }
.proof-ops, .mod-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.mod-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.mod { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; display: grid; gap: 8px; }
.mod.pending { border-color: var(--gold); }
.mod.hidden { opacity: .6; }
.mod-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mod-head small { color: var(--muted); font-size: 12px; }
.mod p { margin: 0; white-space: pre-line; }
.mod textarea { min-height: 54px; }
.editor-back { display: none; }

/* ---------- ניהול מהטלפון ---------- */
@media (max-width: 640px) {
  .admin-top { flex-wrap: wrap; }
  .admin-top .admin-title h1 { font-size: 30px; }
  /* כפתור הפרסום תמיד בהישג יד, בתחתית המסך */
  #btn-publish-top { position: fixed; inset-inline: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 60; justify-content: center; min-height: 52px; box-shadow: var(--shadow-button); }
  body.has-dock #btn-publish-top { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  /* ההודעות הצפות מעל כפתור הפרסום, לא עליו */
  body[data-page="admin"] .notice-host { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .admin-panel { padding-bottom: 80px; }
  .inline-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
  .inline-toggles .btn { justify-content: center; }
  .section-title { flex-wrap: wrap; }
  .switches { flex-direction: column; align-items: stretch; }
  .switches .toggle { justify-content: center; }
  .field input, .field select, .field textarea { font-size: 16px; }   /* בלי הגדלה אוטומטית באייפון */
  .ep-list { max-height: 45vh; }
  .editor-back { display: inline-flex; }
  .bulk-bar, .bulk-actions { flex-wrap: wrap; }
  body[data-page="admin"] dialog.sheet, body[data-page="admin"] dialog.sheet.wide { width: 100%; max-width: none; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .dates-list li { grid-template-columns: 34px 1fr; }
  .dates-list input[type="date"] { grid-column: 1 / -1; width: 100%; }
  .hg-head .btn, .mod-ops .btn, .proof-ops .btn { flex: 1 1 auto; justify-content: center; }
  .comment-form-foot .btn { width: 100%; justify-content: center; }
}

/* ---------- הרגעים שסימנתם ♥ ---------- */
.moment-btn[aria-pressed="true"] { color: var(--pink); border-color: color-mix(in srgb, var(--pink) 55%, transparent); }
.moments-list { display: grid; gap: 10px; }
.moments-row { padding: 12px 14px; border-radius: var(--radius-13); border: 1px solid var(--border); border-inline-start: 4px solid hsl(var(--h) 80% 60%); display: grid; gap: 8px; }
.moments-row a { color: inherit; text-decoration: none; }
.moments-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.moment-pair { display: inline-flex; align-items: center; gap: 2px; }
.moment-del { font: inherit; font-size: 11px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 4px; }
.moment-del:hover { color: var(--error); }
.hot-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.title-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.share-copy-text { white-space: pre-line; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); margin-top: 8px; }

/* ---------- מצב חג (extras.js): ברכה מתחת לשם, גוון חגיגי, וקישוט שנופל פעם אחת ---------- */
.brand small.holiday-line { display: flex; align-items: center; gap: 6px; letter-spacing: .02em; font-size: 12px; font-weight: 800; color: hsl(var(--holiday-hue, 42) 85% 62%); }
:root[data-theme="light"] .brand small.holiday-line { color: hsl(var(--holiday-hue, 42) 70% 34%); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .brand small.holiday-line { color: hsl(var(--holiday-hue, 42) 70% 34%); } }
.holiday-line .menorah { flex: none; color: currentColor; }
.holiday-line .menorah path[fill="#ffb640"] { filter: drop-shadow(0 0 2px #ffb640); animation: flicker 1.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.holiday-icon { font-size: 14px; line-height: 1; }
body.holiday .logo-ring { box-shadow: 0 0 0 2px hsl(var(--holiday-hue) 90% 60% / .55), 0 0 26px hsl(var(--holiday-hue) 90% 60% / .45); }
body.holiday-yom-kippur .logo-ring { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5), 0 0 22px rgba(255, 255, 255, .35); }
@keyframes flicker { from { transform: scaleY(.85); opacity: .85; } to { transform: scaleY(1.1); opacity: 1; } }
.holiday-rain { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.holiday-rain i { position: absolute; top: -8vh; left: var(--x); font-style: normal; font-size: calc(22px * var(--s)); animation: holiday-fall var(--t) cubic-bezier(.3, .1, .6, 1) var(--d) forwards; opacity: 0; }
@keyframes holiday-fall { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: .95; } 85% { opacity: .9; } 100% { transform: translateY(112vh) rotate(var(--r)); opacity: 0; } }

/* ---------- עטיפה חיה: התוכנית שמתנגנת נושמת ופועמת (הכלל עצמו נכתב ב־extras.js) ---------- */
@keyframes cover-beat {
  0%, 100% { transform: scale(1); filter: brightness(1) saturate(1); box-shadow: 0 0 0 0 var(--glow, transparent); }
  14% { transform: scale(1.035); filter: brightness(1.12) saturate(1.15); box-shadow: 0 0 26px 2px var(--glow, transparent); }
  38% { transform: scale(1.012); filter: brightness(1.04); }
}
.ep-card .ep-cover, .ep-card .cover-fallback, .featured-card .cover { transform-origin: 50% 50%; will-change: auto; }

/* ---------- נגן צף (חלון Picture-in-Picture) ---------- */
.pip-body { margin: 0; min-height: 100vh; display: grid; place-items: center; background: var(--bg); color: var(--text); font-family: var(--sans, Heebo, Arial, sans-serif); overflow: hidden; }
.pip { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: center; width: 100%; padding: 14px; box-sizing: border-box; }
.pip-art { width: 110px; height: 110px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h, 268) 70% 45%), hsl(calc(var(--h, 268) + 60) 70% 25%)); color: #fff; font-family: var(--display, Impact); font-size: 44px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.pip-body.is-playing .pip-art { animation: cover-beat .6s ease-in-out infinite; --glow: hsl(var(--h, 42) 90% 62% / .5); }
.pip-art img { width: 100%; height: 100%; object-fit: cover; }
.pip-main { display: grid; gap: 6px; min-width: 0; }
.pip-title { font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-strong); }
.pip-bar { height: 6px; border-radius: 99px; background: rgb(var(--fg-rgb, 255 255 255) / .15); cursor: pointer; overflow: hidden; }
.pip-bar i { display: block; height: 100%; background: var(--gold, #f0c65a); border-radius: inherit; }
.pip-time { font-size: 11.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.pip-controls { display: flex; align-items: center; gap: 6px; }
.pip-controls .dock-play { width: 46px; height: 46px; font-size: 16px; font-weight: 900; color: #15110a; }
body.pip-open .dock [data-pip] { color: var(--gold); }

/* ---------- טעינה מעוצבת: שלדים מנצנצים עד שהתוכן מגיע ---------- */
.skel-block, .skel-line, .skel-tile .skel-img { position: relative; overflow: hidden; background: rgb(var(--fg-rgb) / .07); border-radius: 12px; }
.skel-block::after, .skel-line::after, .skel-tile .skel-img::after { content: ""; position: absolute; inset: 0; transform: translateX(100%); background: linear-gradient(90deg, transparent, rgb(var(--fg-rgb) / .08), transparent); animation: skel-shine 1.4s ease-in-out infinite; }
@keyframes skel-shine { to { transform: translateX(-100%); } }
.skel-line { height: 14px; border-radius: 99px; }
.skel-line.big { height: 38px; width: 70%; border-radius: 14px; }
.skel-line.short { width: 45%; }
.skel-featured { display: grid; grid-template-columns: minmax(160px, 300px) minmax(0, 1fr); gap: 24px; align-items: center; padding: clamp(18px, 3vw, 30px); border: 1px solid var(--border); border-radius: var(--radius-17, 22px); background: var(--glass-1, rgb(var(--fg-rgb) / .03)); margin: 30px 0; }
.skel-featured .skel-block { aspect-ratio: 1; }
.skel-lines { display: grid; gap: 14px; }
.skel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 20px 0; }
.skel-tile { display: grid; gap: 10px; }
.skel-tile .skel-img { aspect-ratio: 1.45; border-radius: var(--radius-13, 16px); }
.skel-ep { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); padding: clamp(18px, 3vw, 30px); }
.skel-ep .skel-block { aspect-ratio: 1; border-radius: 50%; }
@media (max-width: 700px) { .skel-featured, .skel-ep { grid-template-columns: 1fr; } .skel-featured .skel-block, .skel-ep .skel-block { max-width: 220px; } }

/* ---------- מהירות: מה שמתחת למסך לא מצויר עד שמגיעים אליו ---------- */
.site-footer, #about { content-visibility: auto; contain-intrinsic-size: auto 420px; }

/* ---------- מה חדש (home.js): רק כשיש עדכון שעוד לא ראיתם ---------- */
.whats-new { margin: 22px 0; }
.whats-new[hidden] { display: none; }
.news-card {
  position: relative; overflow: hidden; padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgb(var(--gold-rgb) / .45); border-radius: 26px;
  background: radial-gradient(120% 100% at 100% 0%, rgb(var(--gold-rgb) / .2), transparent 60%), var(--card-bg);
  box-shadow: 0 18px 50px var(--sh-1);
  animation: news-in .5s var(--ease) both;
}
.news-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--gold), transparent); }
.news-head { display: flex; align-items: center; gap: 14px; }
.news-head h2 { margin: 2px 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(34px, 5vw, 48px); line-height: 1; }
.news-head .icon-btn { margin-inline-start: auto; }
.news-mark { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--gold-tint); border: 1px solid rgb(var(--gold-rgb) / .45); color: var(--gold-ink); font-size: 22px; animation: news-glow 2.4s ease-in-out infinite; }
.news-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.news-item { display: grid; gap: 6px; align-content: start; padding: 14px 16px; border: 1px solid var(--border); border-radius: 18px; background: rgb(var(--fg-rgb) / .035); }
.news-item time { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--gold-ink); }
.news-item h3 { margin: 0; font-size: 18px; color: var(--text-strong); }
.news-item p { margin: 0; color: var(--text-2); line-height: 1.7; white-space: pre-line; }
.news-item .btn { justify-self: start; margin-top: 4px; }
.news-item .update-files { margin-top: 6px; }
.news-item .update-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.news-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.whats-new.closing .news-card { animation: news-out .28s var(--ease) both; }
@keyframes news-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes news-out { to { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes news-glow { 50% { box-shadow: 0 0 0 6px rgb(var(--gold-rgb) / .12); } }
/* נקודה עם מספר ליד "עדכונים" בתפריט */
.site-nav a.has-new { position: relative; }
.nav-new { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-inline-start: 6px; padding: 0 5px; border-radius: 99px; background: var(--pink); color: #fff; font-style: normal; font-size: 11px; font-weight: 900; line-height: 1; vertical-align: 1px; }
.update.is-new { border-color: rgb(var(--gold-rgb) / .55); box-shadow: 0 0 0 1px rgb(var(--gold-rgb) / .25) inset; }
.new-tag { margin-inline-start: 8px; padding: 1px 8px; border-radius: 99px; background: var(--pink); color: #fff; font-size: 10.5px; font-weight: 900; letter-spacing: 0; }
@media (prefers-reduced-motion: reduce) { .news-card, .news-mark, .whats-new.closing .news-card { animation: none; } }
