/* Approved Ofan notification center: quiet Emanation surfaces, no speech tail. */
.hlc-creature { position: relative; overflow: visible; }
.hlc-creature[data-ofan-attention-visual="rosh-hashanah"] {
  height: 146px;
}
.hlc-creature .hlc-notification-diamond {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 0;
  width: 58px;
  height: 58px;
  margin-left: -29px;
  object-fit: contain;
  image-rendering: auto;
  pointer-events: none;
  filter: drop-shadow(0 0 7px rgba(139, 92, 246, .56)) drop-shadow(0 4px 4px rgba(0, 0, 0, .36));
  animation: none;
}
.hlc-creature .hlc-notification-diamond[hidden] { display: none !important; }
.hlc-creature .hlc-notification-diamond.is-catching { animation: hlc-diamond-catch 1.15s cubic-bezier(.2, .78, .2, 1) both; }
@keyframes hlc-diamond-catch {
  0% { opacity: 0; transform: translate(32px, -42px) scale(.52) rotate(-28deg); }
  16% { opacity: 1; }
  38% { transform: translate(-9px, 25px) scale(.9) rotate(16deg); }
  58% { transform: translate(4px, 6px) scale(1.05) rotate(-6deg); }
  76%, 100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0); }
}

.hlc-panel--notice { height: min(550px, calc(100vh - 156px));
 height: min(550px, calc(100svh - 156px)); }
.hlc-panel--notice::after { display: none; content: none; }
/* Правило с :has() убрано: колонки теперь раздаёт сама полоса вкладок,
   по числу детей, и старым браузерам ничего угадывать не нужно. */
.hlc-tabs .hlc-notification-tab { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.hlc-tabs .hlc-notification-tab__count {
  min-width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold, #d8b04c);
  color: #17111d;
  font-size: 10px;
  line-height: 1;
}
/* Признак «в панели открыты уведомления» ставит код Офана классом
   hlc-panel--notice. Раньше это было условие :has(), которое знают
   Chromium 105 и Safari 15.4 и новее; на телефоне общины Chromium 99, и
   правила высоты панели отбрасывались целиком — панель схлопывалась в
   полоску поверх настроек. Снято 20.09 на самсунге Лираз. */
.hlc-notification-content { height: calc(100% - 107px); max-height: none; padding: 14px 15px 12px; overflow: hidden; }
.hlc-notification-center {
  --hlc-notice-surface: #211b2b;
  --hlc-notice-selected: #272032;
  --hlc-notice-mark: #17131f;
  --hlc-notice-ink: #ece6d8;
  --hlc-notice-muted: #a99fbb;
  --hlc-notice-detail: #b8acc8;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: var(--hlc-notice-ink);
  font-family: var(--ui, "Manrope", system-ui, sans-serif);
}
[data-theme="light"] .hlc-notification-center {
  --hlc-notice-surface: #f8f5fb;
  --hlc-notice-selected: #ece4f5;
  --hlc-notice-mark: #fcfafd;
  --hlc-notice-ink: #2b2136;
  --hlc-notice-muted: #6e6279;
  --hlc-notice-detail: #564a61;
}
.hlc-notification-center button, .hlc-notification-center strong, .hlc-notification-center small,
.hlc-notification-center span, .hlc-notification-center p, .hlc-notification-center time,
.hlc-notification-center h3 { text-shadow: none; }
.hlc-notification-center button, .hlc-notification-center small, .hlc-notification-center span,
.hlc-notification-center p, .hlc-notification-center time { font-family: inherit; }
.hlc-notification-center svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hlc-notification-center__header { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px 8px; border-bottom: 1px solid rgba(118, 91, 158, .28); }
.hlc-notification-center__header > strong { min-width: 0; color: var(--hlc-notice-ink); font-size: 20px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.hlc-notification-center__switch { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 3px 4px 8px; border: 0; color: var(--hlc-notice-detail) !important; background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; }
.hlc-notification-center__switch b { min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; border-radius: 999px; color: #130f19; background: var(--gold, #e6c66a); font-size: 11px; }
.hlc-notification-center__toolbar { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px; padding: 11px 0 4px; }
.hlc-notification-center__toolbar button { min-width: 0; min-height: 40px; padding: 7px 10px; border: 1px solid rgba(118, 91, 158, .42); border-radius: 13px; color: var(--hlc-notice-detail) !important; background: rgba(8, 6, 14, .18); cursor: pointer; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
[data-theme="light"] .hlc-notification-center__toolbar button { background: rgba(255, 255, 255, .58); }
.hlc-notification-center__toolbar button.is-active { border-color: #8b5cf6; color: var(--hlc-notice-ink) !important; background: rgba(139, 92, 246, .12); }
.hlc-notification-center__toolbar button:disabled { opacity: .35; cursor: default; }
.hlc-notification-center__hint { display: -webkit-box; margin: 4px 2px 7px; overflow: hidden; color: var(--hlc-notice-muted); font-size: 12px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.hlc-notification-list, .hlc-notification-archive { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #765b9e rgba(255, 255, 255, .06); }
.hlc-notification-swipe { position: relative; min-height: 78px; overflow: hidden; border-bottom: 1px solid rgba(118, 91, 158, .24); }
.hlc-notification-swipe__read { position: absolute; top:0;right:auto;bottom:0;left:0; width: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #110d17; background: var(--gold, #e6c66a); opacity: 0; font-size: 11px; font-weight: 800; }
.hlc-notification-swipe__read svg { width: 22px; height: 22px; }
.hlc-notification-swipe.is-reading .hlc-notification-swipe__read { opacity: 1; }
.hlc-notification-swipe__actions { position: absolute; top:0;right:0;bottom:0;left:auto; width: 148px; display: grid; grid-template-columns: 72px 76px; opacity: 0; pointer-events: none; }
.hlc-notification-swipe.is-open .hlc-notification-swipe__actions, .hlc-notification-swipe:focus-within .hlc-notification-swipe__actions { opacity: 1; pointer-events: auto; }
.hlc-notification-action { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px; border: 0; cursor: pointer; font-size: 11px; font-weight: 800; }
.hlc-notification-action--later { color: #1a1420 !important; background: #c3abd9; }
.hlc-notification-action--read { color: #130f19 !important; background: var(--gold, #e6c66a); }
.hlc-notification-card { position: relative; z-index: 2; width: 100%; min-height: 78px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 4px 9px 1px; border: 0; color: var(--hlc-notice-ink) !important; background: var(--hlc-notice-surface); text-align: start; cursor: pointer; touch-action: pan-y; transform: translateX(var(--hlc-swipe-x, 0)); transition: transform .2s cubic-bezier(.2, .8, .2, 1), background .2s ease; }
.hlc-notification-card.is-selected { background: var(--hlc-notice-selected); }
.hlc-notification-card__mark { width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid #765b9e; border-radius: 50%; color: var(--hlc-notice-detail); background: var(--hlc-notice-mark); font-size: 13px; font-weight: 800; }
.hlc-notification-card__mark.is-selecting { font-size: 0; }
.hlc-notification-card__mark.is-selecting::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: transparent; transform: scale(0); transition: transform .12s ease, background .12s ease; }
.hlc-notification-card.is-selected .hlc-notification-card__mark.is-selecting::after { background: #8b5cf6; transform: scale(1); }
.hlc-notification-card__copy { min-width: 0; display: block; }
.hlc-notification-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 3px; }
.hlc-notification-card__meta small, .hlc-notification-card__meta time { color: var(--hlc-notice-muted); font-size: 10px; font-weight: 700; line-height: 1.2; }
.hlc-notification-card__copy > strong { display: block; overflow: hidden; color: var(--hlc-notice-ink); font-size: 14px; font-weight: 750; line-height: 1.22; text-overflow: ellipsis; white-space: nowrap; }
.hlc-notification-card__copy > small { display: block; overflow: hidden; margin-top: 3px; color: var(--hlc-notice-detail); font-size: 11px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.hlc-notification-card__copy > small bdi { unicode-bidi: isolate; }
.hlc-notification-card__count { min-width: 26px; height: 26px; display: grid; place-items: center; padding: 0 6px; border-radius: 999px; color: #17111d; background: var(--gold, #e6c66a); font-size: 11px; }
.hlc-notification-card__chevron { color: #9a7ec3; }
.hlc-notification-card__chevron svg { width: 17px; height: 17px; transform: rotate(180deg); }
[dir="rtl"] .hlc-notification-card__chevron svg, [dir="rtl"] .hlc-notification-center__switch svg { transform: scaleX(-1); }
.hlc-notification-center--detail { gap: 0; }
.hlc-notification-detail__header { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 0 0 12px; border-bottom: 1px solid rgba(118, 91, 158, .34); }
.hlc-notification-detail__back { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border: 1px solid rgba(230, 198, 106, .36); border-radius: 12px; color: var(--hlc-notice-detail) !important; background: rgba(8, 6, 14, .16); cursor: pointer; font-size: 11px; font-weight: 750; }
[data-theme="light"] .hlc-notification-detail__back { background: rgba(255, 255, 255, .62); }
.hlc-notification-detail__back svg { flex: 0 0 auto; }
[dir="rtl"] .hlc-notification-detail__back svg { transform: scaleX(-1); }
.hlc-notification-detail__heading { min-width: 0; text-align: start; }
.hlc-notification-detail__heading:focus { outline: none; }
.hlc-notification-detail__heading strong { display: -webkit-box; overflow: hidden; color: var(--hlc-notice-ink); font-family: var(--dispcyr, "Cormorant Garamond", "Forum", serif); font-size: 23px; font-weight: 600; line-height: 1.05; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
html:lang(he) .hlc-notification-detail__heading strong { font-family: "Frank Ruhl Libre", "Times New Roman", serif; }
.hlc-notification-detail__heading small { display: block; margin-top: 4px; color: var(--gold, #e6c66a); font-size: 11px; font-weight: 750; letter-spacing: .045em; }
.hlc-notification-detail__schedule { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 10px; scrollbar-width: thin; scrollbar-color: #765b9e rgba(255, 255, 255, .06); }
.hlc-notification-detail__group { padding: 13px 1px 4px; }
.hlc-notification-detail__group + .hlc-notification-detail__group { margin-top: 7px; border-top: 1px solid rgba(230, 198, 106, .2); }
.hlc-notification-detail__group h3 { margin: 0 0 7px; color: var(--gold, #e6c66a); font-family: var(--ui, "Manrope", system-ui, sans-serif); font-size: 12px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.hlc-notification-detail__row { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; padding: 8px 7px; border-radius: 9px; color: var(--hlc-notice-detail); font-size: 12px; line-height: 1.35; }
.hlc-notification-detail__row:nth-child(even) { background: rgba(139, 92, 246, .055); }
[data-theme="light"] .hlc-notification-detail__row:nth-child(even) { background: rgba(118, 91, 158, .07); }
.hlc-notification-detail__heading bdi, .hlc-notification-detail__group bdi, .hlc-notification-detail__row time { unicode-bidi: isolate; }
.hlc-notification-detail__row time { direction: ltr; color: var(--hlc-notice-ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.hlc-notification-empty { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: var(--hlc-notice-muted); text-align: center; }
.hlc-notification-empty__mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(230, 198, 106, .42); border-radius: 50%; color: var(--gold, #e6c66a); }
.hlc-notification-empty strong { color: var(--hlc-notice-ink); font-size: 15px; }
.hlc-notification-empty small { font-size: 11px; line-height: 1.4; }
.hlc-notification-archive__item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 1px; border-bottom: 1px solid rgba(118, 91, 158, .22); }
.hlc-notification-archive__item > span:nth-child(2) { min-width: 0; }
.hlc-notification-archive__item small, .hlc-notification-archive__item strong { display: block; }
.hlc-notification-archive__item small { overflow: hidden; color: var(--hlc-notice-muted); font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.hlc-notification-archive__item strong { overflow: hidden; margin: 3px 0; color: var(--hlc-notice-ink); font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.hlc-notification-archive__item > button { min-height: 34px; padding: 5px 7px; border: 1px solid rgba(118, 91, 158, .42); border-radius: 10px; color: var(--hlc-notice-detail) !important; background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }

@media (max-width: 700px) {
  .hlc-creature[data-ofan-attention-visual="rosh-hashanah"] {
    height: 130px;
  }
  .hlc-panel--notice {
    height: min(440px, max(300px, calc(100vh - 330px - env(safe-area-inset-top, 0px))));
    height: min(440px, max(300px, calc(100svh - 330px - env(safe-area-inset-top, 0px))));
  }
  /* Признак «в панели открыты уведомления» ставит код Офана классом
   hlc-panel--notice. Раньше это было условие :has(), которое знают
   Chromium 105 и Safari 15.4 и новее; на телефоне общины Chromium 99, и
   правила высоты панели отбрасывались целиком — панель схлопывалась в
   полоску поверх настроек. Снято 20.09 на самсунге Лираз. */
.hlc-notification-content { height: calc(100% - 107px); }
  .hlc-notification-center__toolbar { grid-template-columns: 1fr; }
  .hlc-notification-center__toolbar button { min-height: 44px; font-size: 13px; }
  .hlc-notification-card { min-height: 86px; }
  .hlc-notification-card__copy > strong { font-size: 16px; }
  .hlc-notification-card__copy > small { font-size: 13px; }
  .hlc-notification-center__hint { font-size: 13px; }
  .hlc-notification-detail__row { grid-template-columns: 52px minmax(0, 1fr); padding-block: 9px; font-size: 13px; }
}
@media (max-width: 360px) {
  .hlc-tabs button { font-size: 11px; }
  .hlc-notification-archive__item { grid-template-columns: 40px minmax(0, 1fr); }
  .hlc-notification-archive__item > button { grid-column: 1 / -1; width: 100%; }
  .hlc-notification-detail__back span { display: none; }
  .hlc-notification-detail__back { width: 44px; justify-content: center; padding-inline: 7px; }
}
/* Тот же изъян, что у боковой полосы: открытая клавиатура выдаёт себя за
   альбомную ориентацию. Чиню здесь ЗАОДНО, а не оставляю близнеца ждать
   своей жалобы — иначе это заплатка, а не починка. */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 480px) {
  html:not(.kb-open) .hlc-panel--notice {
    height: calc(100vh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    height: calc(100svh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100vh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100svh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  }
  html:not(.kb-open) .hlc-panel--notice .hlc-notification-content {
    height: calc(100% - 107px);
    max-height: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hlc-creature .hlc-notification-diamond.is-catching { animation: none; }
  .hlc-notification-card { transition: none; }
}
