/* Hubstorie Notifications dialog — premium */
.hn-dialog {
  position: fixed; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: 10000; padding: 0;
  animation: hnFadeIn 0.2s ease;
}
@keyframes hnFadeIn { from { opacity: 0; } to { opacity: 1; } }

.hn-card {
  background: linear-gradient(180deg, #26262b 0%, #1f1f23 100%);
  border: 1px solid rgba(212,165,116,0.25);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 28px 24px 22px;
  max-width: 440px; width: 100%;
  color: #ede4d3;
  font-family: 'Inter Tight', -apple-system, system-ui, sans-serif;
  position: relative;
  box-shadow: 0 -8px 50px rgba(0,0,0,0.55);
  animation: hnSlideUp 0.32s cubic-bezier(.16,1,.3,1);
  text-align: center;
}
@keyframes hnSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

@media (min-width: 640px) {
  .hn-dialog { align-items: center; padding: 20px; }
  .hn-card {
    border-radius: 18px; border-bottom: 1px solid rgba(212,165,116,0.25);
    animation: hnPop 0.28s cubic-bezier(.16,1,.3,1);
  }
  @keyframes hnPop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}

.hn-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; padding: 0;
  background: rgba(255,255,255,0.05); border: none; border-radius: 50%;
  color: #8a8275; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.hn-close:hover { background: rgba(255,255,255,0.1); color: #ede4d3; }
.hn-close svg { width: 16px; height: 16px; }

.hn-bell {
  width: 54px; height: 54px; margin: 0 auto 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(212,165,116,0.25), rgba(212,165,116,0.08));
  display: flex; align-items: center; justify-content: center;
  color: #d4a574;
  animation: hnBell 0.6s ease 0.2s both;
}
@keyframes hnBell {
  0% { transform: rotate(0); }
  20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); }
  100% { transform: rotate(0); }
}
.hn-bell svg { width: 28px; height: 28px; }

.hn-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 21px; font-weight: 600;
  margin-bottom: 10px; line-height: 1.3;
}
.hn-body { color: #a8a092; font-size: 14px; line-height: 1.55; margin-bottom: 22px; padding: 0 4px; }

.hn-row { display: flex; flex-direction: column; gap: 10px; }

.hn-choice {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: #ede4d3; font-size: 15px; font-weight: 500;
  font-family: inherit; cursor: pointer; text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
}
.hn-choice:hover { border-color: rgba(212,165,116,0.5); background: rgba(212,165,116,0.08); }
.hn-choice:active { transform: scale(0.98); }
.hn-choice-ico {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px; background: rgba(212,165,116,0.12);
  display: flex; align-items: center; justify-content: center;
  color: #d4a574; font-size: 17px;
}
.hn-choice-ico svg { width: 19px; height: 19px; }
.hn-choice-both { border-color: rgba(212,165,116,0.35); background: rgba(212,165,116,0.06); }
.hn-choice-both .hn-choice-ico { background: rgba(212,165,116,0.22); }

.hn-email-row { text-align: left; }
.hn-label {
  display: block; font-size: 12px; color: #8a8275;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px;
}
.hn-email-field { display: flex; gap: 8px; }
.hn-input {
  flex: 1; background: #161618; border: 1px solid #3a3a3e; border-radius: 10px;
  color: #ede4d3; padding: 13px 15px; font-size: 16px; font-family: inherit;
  outline: none; transition: border-color 0.15s; min-width: 0;
}
.hn-input:focus { border-color: #d4a574; }
.hn-btn {
  background: #d4a574; color: #1a1a1c;
  border: none; border-radius: 10px;
  padding: 13px 22px; font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background 0.15s, transform 0.08s;
  white-space: nowrap;
}
.hn-btn:hover { background: #e0b585; }
.hn-btn:active { transform: scale(0.97); }

.hn-later-text {
  background: transparent; color: #6b6358;
  border: none; padding: 10px; cursor: pointer;
  font-family: inherit; font-size: 13px;
  margin-top: 14px; width: 100%;
}
.hn-later-text:hover { color: #a8a092; }

.hn-msg { font-size: 13px; margin-top: 12px; min-height: 16px; }
.hn-ok { color: #7fc18f; }
.hn-error { color: #e88; }

@supports (padding: env(safe-area-inset-bottom)) {
  @media (max-width: 639px) {
    .hn-card { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  }
}

/* ===== Контролы (push-кнопка + email) — общие ===== */
.hn-controls { display: flex; flex-direction: column; gap: 0; text-align: left; }
.hn-channel {
  display: flex; align-items: center; gap: 13px;
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  color: #ede4d3; font-family: inherit; cursor: pointer; text-align: left;
  transition: border-color .15s, background .15s;
}
.hn-channel:hover:not(:disabled) { border-color: rgba(212,165,116,0.5); background: rgba(212,165,116,0.08); }
.hn-channel:disabled { opacity: .5; cursor: default; }
.hn-ch-ico {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
  background: rgba(212,165,116,0.12); color: #d4a574;
  display: flex; align-items: center; justify-content: center;
}
.hn-ch-ico svg { width: 19px; height: 19px; }
.hn-ch-txt { display: flex; flex-direction: column; flex: 1; gap: 2px; }
.hn-ch-txt b { font-size: 15px; font-weight: 600; }
.hn-ch-txt small { font-size: 12px; color: #8a8275; }
.hn-ch-arrow { color: #6b6358; font-size: 18px; }
.hn-or { text-align: center; color: #4a443c; font-size: 12px; padding: 10px 0; letter-spacing: 4px; }
.hn-email-cap { margin-bottom: 8px; }
.hn-email-field { display: flex; gap: 8px; }
.hn-email-block .hn-input {
  flex: 1; min-width: 0;
  background: #161618; border: 1px solid #3a3a3e; border-radius: 10px;
  color: #ede4d3; padding: 12px 14px; font-size: 16px; font-family: inherit; outline: none;
}
.hn-email-block .hn-input:focus { border-color: #d4a574; }
.hn-warn {
  background: rgba(212,165,116,0.08); border: 1px solid rgba(212,165,116,0.25);
  border-radius: 10px; padding: 12px 14px; color: #cdbfa8; font-size: 13px;
  line-height: 1.5; text-align: left; margin-top: 4px;
}

/* ===== Аккордеон в меню ===== */
.app-menu-accordion { cursor: pointer; }
.app-menu-chevron { width: 18px; height: 18px; transition: transform .2s; flex-shrink: 0; }
.app-menu-accordion.open .app-menu-chevron { transform: rotate(180deg); }
.app-menu-accordion-body {
  display: none; padding: 14px 16px 6px;
  animation: hnAccDown .22s ease;
}
@keyframes hnAccDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.hn-acc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hn-acc-k { font-size: 13px; color: #8a8275; }
.hn-acc-email { font-size: 14px; color: #d4a574; word-break: break-all; }
.hn-acc-body { font-size: 13px; color: #a8a092; line-height: 1.5; margin-bottom: 14px; }
.hn-icon-btn {
  background: transparent; border: none; color: #8a8275; cursor: pointer;
  padding: 6px; border-radius: 6px; display: flex; flex-shrink: 0;
  transition: color .15s, background .15s;
}
.hn-icon-btn:hover { color: #e88; background: rgba(255,90,90,0.08); }
.hn-icon-btn svg { width: 17px; height: 17px; }
.hn-mini-btn {
  background: rgba(212,165,116,0.14); color: #d4a574;
  border: none; border-radius: 8px; padding: 6px 12px;
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.hn-mini-btn:hover { background: rgba(212,165,116,0.24); }
.hn-btn-outline {
  background: transparent !important; color: #d4a574 !important;
  border: 1px solid rgba(212,165,116,0.4) !important;
}
.hn-btn-outline:hover { background: rgba(212,165,116,0.08) !important; }

/* ===== Install bottom-sheet (PWA) ===== */
/* Оболочка/оверлей/ручка/крестик предоставляет единый примитив HubFront.openSheet
   (className 'pwa-sheet-host'). Здесь — только контент install-шита. */
/* Область лого install-шита: отступ сверху (не прилипает к краю) + место справа под
   плавающий крестик (closable), вертикальное центрирование марки и словознака. */
.pwa-sheet-head { display: flex; align-items: center; gap: 13px; margin: 4px 44px 18px 2px; }
/* Бренд-марка install-шита — модульный /favicon.svg (вместо bespoke .pwa-sheet-logo). */
.pwa-sheet-mark { width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto; display: block; }
.pwa-sheet-head .hub-logo { line-height: 1.1; }
.pwa-sheet-head .pwa-sheet-sub { margin-top: 3px; }
.pwa-sheet-sub { font-size: 13px; color: #8a8275; margin-top: 2px; }

/* Грид: слева одна высокая, справа две квадратные стопкой.
   Высота двух правых = высоте левой. */
.pwa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.pwa-grid-left img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 14px; display: block;
  aspect-ratio: 1 / 2;  /* вертикальная — ровно две квадратные по высоте */
}
.pwa-grid-right { display: flex; flex-direction: column; gap: 10px; }
.pwa-grid-right img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 14px; display: block;
}
.pwa-sheet-action { }
.pwa-sheet-btn {
  width: 100%; background: #d4a574; color: #18191A;
  border: none; border-radius: 12px; padding: 15px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  font-family: 'Inter Tight', system-ui, sans-serif;
  transition: background 0.15s, transform 0.08s;
}
.pwa-sheet-btn:hover { background: #e0b585; }
.pwa-sheet-btn:active { transform: scale(0.98); }
.pwa-sheet-note {
  background: rgba(212,165,116,0.08); border: 1px solid rgba(212,165,116,0.22);
  border-radius: 12px; padding: 14px 16px; color: #cdbfa8;
  font-size: 14px; line-height: 1.5; text-align: center;
}
