:root { --oh-height: 66px; }
#oraculum-practice-header {
  position: relative;
  z-index: 1001;
  pointer-events: none;
}
#oraculum-practice-header .oh-header { pointer-events: auto; }
.oh-header {
  position: sticky; top: 0; z-index: 1000;
  width: 100vw!important; height: var(--oh-height)!important;
  color: #ece8f7; background: rgba(15,11,34,.94);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}
.rewarded-ad-active .oh-header {
  visibility: hidden !important;
  pointer-events: none !important;
}
.oraculum-web-shell .oh-header { position: fixed; }
.oh-inner {
  width: min(1120px,100%); height: 100%;
  box-sizing: border-box;
  display: grid; grid-template-columns: 180px 118px minmax(0,1fr) 190px;
  position:relative!important; top:auto!important; left:auto!important;
  align-items:center!important; gap:18px!important; margin:0 auto!important; padding:0 20px!important;
}
.oh-brand { width:180px; display:flex; align-items:center; gap:11px; color:#ece8f7; text-decoration:none; font:700 22px/1 Georgia,"Times New Roman",serif; white-space:nowrap; }
.oh-brand b { color:#e6cf86; }
.oh-logo { width:30px; height:30px; flex:none; color:#c9a84c; }
.oh-context { width:118px; min-width:118px; display:flex; align-items:center; gap:10px; overflow:hidden; }
.oh-context strong { overflow:hidden; color:#e6cf86; font-size:15px; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }
.oh-context.oh-profile-control { height:46px; display:grid; grid-template-columns:1px minmax(0,1fr); grid-template-rows:20px 17px; column-gap:10px; align-content:center; cursor:pointer; border-radius:9px; }
.oh-context.oh-profile-control:hover { background:rgba(255,255,255,.04); }
.oh-context.oh-profile-control:focus-visible { outline:2px solid #e6cf86; outline-offset:2px; }
.oh-context.oh-profile-control .oh-separator { grid-row:1 / 3; }
.oh-context.oh-profile-control strong { align-self:end; font-size:13px; line-height:16px; }
.oh-practice-profile-name { grid-column:2; position:relative; min-width:0; display:block; box-sizing:border-box; padding-right:13px; overflow:hidden; color:#a79fc6; font-size:11px; line-height:15px; text-overflow:ellipsis; white-space:nowrap; }
.oh-practice-profile-name::after { content:'⌄'; position:absolute; top:0; right:1px; width:9px; color:#e6cf86; text-align:center; }
.oh-separator { width:1px; height:22px; flex:none; background:rgba(201,168,76,.18); }
.oh-nav { min-width:0; display:flex; align-items:center; justify-content:flex-start; gap:10px; overflow:hidden; }
.oh-nav > a,.oh-navslot a,.oh-navslot button { color:#a79fc6; text-decoration:none; font:500 15px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; }
.oh-nav > a:hover,.oh-nav > a.active,.oh-navslot .active { color:#e6cf86; }
.oh-navslot { min-width:0; display:flex; align-items:center; justify-content:flex-start; }
.oh-practice-nav { min-width:0; height:66px; display:flex; align-items:center; gap:2px; overflow:hidden; }
.oh-practice-link { min-width:0; min-height:38px; display:inline-flex; align-items:center; justify-content:center; padding:7px 8px; color:#a79fc6; background:transparent; border:0; border-radius:9px; font:500 15px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; letter-spacing:0; text-transform:none; white-space:nowrap; cursor:pointer; }
.oh-practice-link:hover { color:#ece8f7; background:rgba(255,255,255,.04); }
.oh-practice-link.active { color:#e6cf86; background:rgba(201,168,76,.08); }
.oh-contextslot { display:none!important; }
.oh-account { width:190px; min-height:38px; display:flex; align-items:center; justify-content:center; gap:9px; overflow:hidden; color:#1a1206; background:linear-gradient(135deg,#c9a84c,#e6cf86); border:0; border-radius:999px; font-size:15px; font-weight:500; text-decoration:none; white-space:nowrap; }
.oh-account.is-authenticated { justify-content:flex-end; color:#a79fc6; background:transparent; }
.oh-account-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.oh-account b { flex:none; padding:5px 9px; color:#e6cf86; background:rgba(201,168,76,.08); border:1px solid rgba(201,168,76,.18); border-radius:999px; font-size:11px; }
.oh-burger { display:none; }
@media (min-width:900px) {
  .oh-header .oh-inner{display:grid!important;grid-template-columns:180px 118px minmax(0,1fr) 190px!important;height:66px!important}
  .oh-header .oh-nav{position:static!important;inset:auto!important;min-width:0!important;height:66px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;margin:0!important;padding:0!important;overflow:hidden!important;transform:none!important;background:transparent!important;border:0!important}
  .oh-header .oh-brand{width:180px!important;height:30px!important;margin:0!important;padding:0!important;font:700 22px/1 Georgia,"Times New Roman",serif!important}
  .oh-header .oh-context{width:118px!important;min-width:118px!important;margin:0!important;padding:0!important}
  .oh-header .oh-context:not(.oh-profile-control){height:22px!important}
  .oh-header .oh-context strong{color:#e6cf86!important;font:500 15px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important}
  .oh-header .oh-nav>a{display:inline-flex!important;align-items:center!important;min-height:38px!important;padding:7px 0!important;color:#a79fc6!important;font:500 15px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;letter-spacing:0!important;text-transform:none!important}
  .oh-header .oh-nav>a.active{color:#e6cf86!important}
  .oh-header .oh-account{width:190px!important;height:38px!important;margin:0!important;font:500 15px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important}
  .oh-navslot{min-width:0!important;display:flex!important;align-items:center!important;overflow:hidden!important}
  .oh-navslot > .bottom-nav,.oh-navslot > #bottom-nav,.oh-navslot > nav { position:static!important;inset:auto!important;width:auto!important;max-width:100%!important;height:66px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:0!important;margin:0!important;padding:0!important;overflow:hidden!important;transform:none!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important; }
  .oh-navslot a,.oh-navslot button,.oh-navslot .nav-item,.oh-navslot .nav-btn,.oh-navslot .bottom-tab,.oh-navslot .ni { width:auto!important;min-width:0!important;min-height:38px!important;display:inline-flex!important;flex:0 1 auto!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:0!important;padding:7px 8px!important;border:0!important;border-radius:9px!important;color:#a79fc6!important;background:transparent!important;font:500 15px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;letter-spacing:0!important;text-transform:none!important;white-space:nowrap!important; }
  .oh-navslot svg,.oh-navslot .nav-icon{display:none!important}.oh-navslot .active{color:#e6cf86!important}.oh-navslot .oraculum-redundant-home,[data-oraculum-flow-hidden],[data-oraculum-desktop-source]{display:none!important}
}
@media (max-width:899px) {
  :root { --oh-height:58px; }
  .oh-inner { grid-template-columns:minmax(0,1fr) auto auto; grid-template-rows:58px; gap:10px!important; padding:0 14px!important; }
  .oh-brand { grid-column:1; grid-row:1; width:auto; min-width:0; font-size:19px; overflow:hidden; }
  .oh-brand span { overflow:hidden; text-overflow:ellipsis; }
  .oh-logo{width:26px;height:26px}
  .oh-context{display:none}
  .oh-context.oh-profile-control{max-width:128px;grid-template-rows:18px 15px;column-gap:7px}.oh-context.oh-profile-control .oh-separator{height:34px}.oh-practice-profile-name{font-size:10px}
  .oh-nav {
    position:fixed;
    inset:var(--oh-height) 0 auto;
    z-index:2;
    width:100%;
    height:auto!important;
    min-height:0!important;
    max-height:calc(100dvh - var(--oh-height));
    display:none;
    padding:14px 18px;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start!important;
    gap:4px;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    background:#14102b;
    border-bottom:1px solid rgba(255,255,255,.06);
  }
  .oh-header.menu-open .oh-nav{display:flex}.oh-navslot{flex-direction:column;align-items:stretch}.oh-practice-nav{width:100%;height:auto;display:flex;flex-direction:column;align-items:stretch;gap:2px;overflow:visible}.oh-practice-link{width:100%;justify-content:flex-start}.oh-nav a,.oh-nav button{padding:11px 4px}
  .oh-account{grid-column:2;grid-row:1;width:auto;min-width:0;min-height:36px;padding:0 8px;font-size:13px}.oh-account.is-authenticated .oh-account-name{display:none}.oh-account b{min-width:max-content;padding:6px 10px;font-size:12px;line-height:1;white-space:nowrap}
  .oh-burger{position:relative;z-index:3;grid-column:3;grid-row:1;width:34px;height:34px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#ece8f7!important;background:transparent;border:0;opacity:1!important;pointer-events:auto!important;cursor:pointer;touch-action:manipulation}.oh-burger span{width:19px;height:2px;background:currentColor}

  /* Тароскоп: название практики занимает компактную вторую строку,
     как контекстная строка Ведаскопа, но без селектора профиля. */
  html[data-oraculum-app="taroscope"] { --oh-height:86px; --oraculum-sitebar-h:86px; }
  html[data-oraculum-app="taroscope"] .oh-inner {
    grid-template-columns:minmax(0,1fr) auto auto;
    grid-template-rows:58px 28px;
    row-gap:0!important;
    column-gap:10px!important;
  }
  html[data-oraculum-app="taroscope"] .oh-context {
    grid-column:1 / 4;
    grid-row:2;
    width:100%;
    min-width:0;
    height:28px;
    display:flex;
    align-items:center;
    padding:0 16px;
    border-top:1px solid rgba(255,255,255,.06);
    overflow:hidden;
  }
  html[data-oraculum-app="taroscope"] .oh-context .oh-separator { display:none; }
  html[data-oraculum-app="taroscope"] .oh-context strong {
    color:#e6cf86;
    font-size:11px;
    font-weight:600;
    line-height:1;
    letter-spacing:.16em;
    text-transform:uppercase;
  }

  /* Морфей использует такую же компактную строку названия практики. */
  html[data-oraculum-app="morfey"] { --oh-height:86px; --oraculum-sitebar-h:86px; }
  html[data-oraculum-app="morfey"] .oh-inner {
    grid-template-columns:minmax(0,1fr) auto auto;
    grid-template-rows:58px 28px;
    row-gap:0!important;
    column-gap:10px!important;
  }
  html[data-oraculum-app="morfey"] .oh-context {
    grid-column:1 / 4;
    grid-row:2;
    width:100%;
    min-width:0;
    height:28px;
    display:flex;
    align-items:center;
    padding:0 16px;
    border-top:1px solid rgba(255,255,255,.06);
    overflow:hidden;
  }
  html[data-oraculum-app="morfey"] .oh-context .oh-separator { display:none; }
  html[data-oraculum-app="morfey"] .oh-context strong {
    color:#e6cf86;
    font-size:11px;
    font-weight:600;
    line-height:1;
    letter-spacing:.16em;
    text-transform:uppercase;
  }

  /* Астроскоп показывает название практики в такой же второй строке. */
  html[data-oraculum-app="astroscope"] { --oh-height:86px; --oraculum-sitebar-h:86px; }
  html[data-oraculum-app="astroscope"] .oh-inner {
    grid-template-columns:minmax(0,1fr) auto auto;
    grid-template-rows:58px 28px;
    row-gap:0!important;
    column-gap:10px!important;
  }
  html[data-oraculum-app="astroscope"] .oh-context {
    grid-column:1 / 4;
    grid-row:2;
    width:100%;
    min-width:0;
    height:28px;
    display:flex;
    align-items:center;
    padding:0 16px;
    border-top:1px solid rgba(255,255,255,.06);
    overflow:hidden;
  }
  html[data-oraculum-app="astroscope"] .oh-context .oh-separator { display:none; }
  html[data-oraculum-app="astroscope"] .oh-context strong {
    color:#e6cf86;
    font-size:11px;
    font-weight:600;
    line-height:1;
    letter-spacing:.16em;
    text-transform:uppercase;
  }

  /* Ведаскоп: на мобильном экране практика и её профиль занимают
     одну отдельную строку. Старая внутренняя шапка практики больше не нужна. */
  html[data-oraculum-app="jyotish"] { --oh-height:102px; }
  html[data-oraculum-app="jyotish"] .oh-inner {
    grid-template-columns:minmax(0,1fr) auto auto;
    grid-template-rows:58px 44px;
    row-gap:0!important;
    column-gap:10px!important;
  }
  html[data-oraculum-app="jyotish"] .oh-context.oh-profile-control {
    grid-column:1 / 4;
    grid-row:2;
    width:100%;
    max-width:none;
    min-width:0;
    height:44px;
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    grid-template-rows:44px;
    column-gap:14px;
    align-items:center;
    padding:0 2px;
    overflow:hidden;
    border-top:1px solid rgba(255,255,255,.06);
    border-radius:0;
  }
  html[data-oraculum-app="jyotish"] .oh-context.oh-profile-control .oh-separator { display:none; }
  html[data-oraculum-app="jyotish"] .oh-context.oh-profile-control strong {
    grid-column:1;
    align-self:center;
    transform:none;
    overflow:visible;
    color:#e6cf86;
    font-size:13px;
    line-height:1.2;
  }
  html[data-oraculum-app="jyotish"] .oh-practice-profile-name {
    grid-column:2;
    align-self:center;
    transform:none;
    justify-self:end;
    max-width:min(58vw,260px);
    padding-right:16px;
    color:#ece8f7;
    font-size:13px;
    font-weight:600;
    line-height:1.2;
    text-align:right;
  }
  html[data-oraculum-app="jyotish"] .oh-practice-profile-name::after {
    top:50%;
    right:2px;
    width:6px;
    height:6px;
    content:'';
    border-right:1.5px solid #e6cf86;
    border-bottom:1.5px solid #e6cf86;
    transform:translateY(-72%) rotate(45deg);
  }
}
