/* ═══ style/layout.css — hlavička, menu profilu, patička, příkazová paleta (jediná podoba na celém webu) ═══ */
@import url('/style/nav.css');
@import url('/style/footer.css');
.hb-progress{position:fixed;left:0;top:0;height:3px;width:100%;z-index:10000;background:var(--accent);transform:scaleX(0);transform-origin:0 50%;pointer-events:none}

/* ── hlavička ── */
.hb-header{position:sticky;top:0;z-index:100;height:calc(var(--nav-h) + var(--nav-top));padding-top:var(--nav-top);border-bottom:1px solid var(--border);flex:none}
.hb-header::before{content:"";position:absolute;inset:0;z-index:-1;background:color-mix(in srgb,var(--background) 86%,transparent);-webkit-backdrop-filter:saturate(1.4) blur(12px);backdrop-filter:saturate(1.4) blur(12px)}
.hb-header__in{height:100%;display:flex;align-items:center;gap:6px}
.hb-logo{display:inline-flex;align-items:center;gap:10px;flex:none;font-weight:700;font-size:1.1rem;letter-spacing:-.02em;color:var(--foreground)!important;text-decoration:none!important;margin-right:12px;white-space:nowrap}
.hb-logo img{width:30px;height:30px;border-radius:8px}
.hb-nav{display:flex;align-items:center;gap:2px;flex:1;min-width:0}
.hb-nav__link,.hb-dd>button{position:relative;display:inline-flex;align-items:center;gap:6px;min-height:2.25rem;padding:.35rem .75rem;border-radius:var(--r-sm);color:var(--muted-foreground);background:none;border:0;font-size:.875rem;font-weight:500;white-space:nowrap;text-decoration:none!important;transition:color .15s,background .15s}
.hb-nav__link:hover,.hb-dd>button:hover,.hb-dd.open>button{color:var(--foreground);background:var(--secondary)}
.hb-nav__link[aria-current="page"],.hb-dd.has-current>button{color:var(--foreground)}
.hb-nav__link[aria-current="page"]::after{content:"";position:absolute;left:.75rem;right:.75rem;bottom:1px;height:2px;border-radius:2px;background:var(--accent)}
.hb-dd{position:relative}
.hb-dd>button .ic{width:14px;height:14px;transition:transform .2s var(--ease)}.hb-dd.open>button .ic{transform:rotate(180deg)}
.hb-dd__menu{position:absolute;left:0;top:calc(100% + 8px);z-index:110;width:max-content;min-width:260px;max-width:min(340px,calc(100vw - 2 * var(--gutter)));max-height:calc(100dvh - var(--nav-h) - var(--nav-top) - 24px);overflow:auto;overscroll-behavior:contain;background:var(--popover);color:var(--popover-foreground);border:1px solid var(--border-strong);border-radius:var(--r-md);padding:6px;box-shadow:var(--shadow-lg);display:none;transform-origin:top left}
.hb-dd.open>.hb-dd__menu{display:block;animation:hbPop .18s var(--ease)}
.hb-dd__menu.end,.hb-profile .hb-dd__menu,.hb-bell .hb-dd__menu{left:auto;right:0;transform-origin:top right}
.hb-dd__item{display:flex;gap:12px;align-items:flex-start;width:100%;padding:.55rem .7rem;border-radius:calc(var(--r-sm) - 1px);color:var(--popover-foreground);background:none;border:0;text-align:left;text-decoration:none!important;transition:background .12s}
.hb-dd__item:hover,.hb-dd__item:focus-visible{background:var(--secondary)}
.hb-dd__item .ic{margin-top:2px;color:var(--muted-foreground);width:1.1em;height:1.1em}
.hb-dd__item:hover .ic{color:var(--accent)}
.hb-dd__item>span{min-width:0}
.hb-dd__item b{display:block;font-weight:600;font-size:.875rem;line-height:1.3}
.hb-dd__item small{display:block;color:var(--muted-foreground);font-size:.78rem;line-height:1.35}
.hb-dd__item[aria-current="page"]{background:var(--accent-soft)}
.hb-dd__item--danger,.hb-dd__item--danger .ic{color:var(--destructive)}
.hb-dd__sep{height:1px;background:var(--border);margin:6px 2px}
.hb-dd__label{padding:.4rem .7rem .2rem;font-size:.72rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--subtle-foreground)}
.hb-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex:none}
.hb-kbd-btn{display:inline-flex;align-items:center;gap:10px;min-height:2.25rem;padding:.35rem .6rem .35rem .8rem;border-radius:var(--r-sm);border:1px solid var(--border-strong);background:transparent;color:var(--muted-foreground);font-size:.8125rem;transition:border-color .15s,color .15s,background .15s}
.hb-kbd-btn:hover{color:var(--foreground);background:var(--secondary)}.hb-kbd-btn kbd{font-size:.68rem;padding:0 6px}
.hb-bell>button{position:relative;display:inline-grid;place-items:center;width:2.25rem;height:2.25rem;padding:0;border-radius:var(--r-sm);border:0;background:none;color:var(--muted-foreground)}
.hb-bell>button:hover,.hb-bell.open>button{color:var(--foreground);background:var(--secondary)}
.hb-bell b{position:absolute;top:1px;right:1px;min-width:16px;height:16px;padding:0 4px;border-radius:99px;background:var(--destructive);color:#fff;font-size:.68rem;font-weight:700;display:grid;place-items:center;line-height:1}
.hb-bell .hb-dd__menu{min-width:min(300px,calc(100vw - 2 * var(--gutter)))}
.hb-profile>button{display:flex;align-items:center;gap:8px;min-height:2.25rem;padding:3px 10px 3px 3px;border-radius:99px;border:1px solid var(--border-strong);background:transparent;color:var(--foreground)}
.hb-profile>button:hover,.hb-profile.open>button{background:var(--secondary)}
.hb-profile>button .hb-avatar{width:30px;height:30px}
.hb-profile>button .n{font-size:.875rem;font-weight:600;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hb-profile .hb-dd__menu{min-width:min(280px,calc(100vw - 2 * var(--gutter)))}
.hb-profile__head{display:flex;gap:12px;align-items:center;padding:.6rem .7rem .7rem;min-width:0}
.hb-profile__head>div{min-width:0}
.hb-profile__head b{display:block;line-height:1.25;overflow-wrap:anywhere}.hb-profile__head small{color:var(--muted-foreground);display:block;overflow-wrap:anywhere}
.hb-profile__head .hb-roles{margin-top:6px}
.hb-burger{display:none;place-items:center;width:2.5rem;height:2.5rem;flex:none;border-radius:var(--r-sm);border:1px solid var(--border-strong);background:transparent;color:var(--foreground)}
.hb-burger:hover{background:var(--secondary)}
.hb-burger .ic:last-child,.hb-burger[aria-expanded="true"] .ic:first-child{display:none}.hb-burger[aria-expanded="true"] .ic:last-child{display:inline-block}

@media (max-width:1080px){.hb-kbd-btn span,.hb-kbd-btn kbd{display:none}.hb-kbd-btn{padding:.35rem .6rem}.hb-profile>button .n{display:none}.hb-profile>button{padding-right:3px}}
@media (max-width:900px){
  .hb-burger{display:grid}
  .hb-nav{position:fixed;left:0;right:0;top:calc(var(--nav-h) + var(--nav-top));flex-direction:column;align-items:stretch;gap:2px;padding:10px var(--gutter) 16px;background:var(--background);border-bottom:1px solid var(--border-strong);box-shadow:var(--shadow-lg);max-height:calc(100dvh - var(--nav-h) - var(--nav-top));overflow:auto;overscroll-behavior:contain;display:none;z-index:99}
  .hb-nav.open{display:flex}
  .hb-nav__link{min-height:2.75rem;padding:.5rem .75rem;font-size:.95rem}
  .hb-nav__link[aria-current="page"]{background:var(--accent-soft)}.hb-nav__link[aria-current="page"]::after{display:none}
  .hb-nav .hb-dd>button{pointer-events:none;min-height:0;padding:.9rem .75rem .25rem;font-size:.72rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--subtle-foreground)}
  .hb-nav .hb-dd>button .ic{display:none}
  .hb-nav .hb-dd__menu{position:static;display:block;width:auto;min-width:0;max-width:none;max-height:none;overflow:visible;border:0;box-shadow:none;background:transparent;padding:0;animation:none}
  .hb-nav .hb-dd__item{padding:.65rem .75rem}
  .hb-header__in{gap:8px}.hb-logo{margin-right:auto}.hb-actions{margin-left:0}
}
@media (max-width:380px){.hb-logo span{display:none}}

/* ── patička ── */
.hb-footer{flex:none;margin-top:clamp(40px,8vw,72px);border-top:1px solid var(--border);background:color-mix(in srgb,var(--secondary) 55%,transparent);padding:clamp(28px,5vw,44px) 0 calc(22px + env(safe-area-inset-bottom,0px));font-size:.875rem}
.hb-footer__grid{display:grid;gap:clamp(20px,4vw,34px);grid-template-columns:minmax(0,1.5fr) repeat(auto-fit,minmax(min(100%,140px),1fr))}
.hb-footer h3{font-size:.8125rem;color:var(--foreground);margin-bottom:10px;letter-spacing:0}
.hb-footer__col{min-width:0}
.hb-footer__col a{display:flex;align-items:center;gap:8px;color:var(--muted-foreground);padding:4px 0;text-decoration:none!important;transition:color .15s,transform .2s var(--ease);overflow-wrap:anywhere}
.hb-footer__col a:hover{color:var(--foreground);transform:translateX(2px)}
.hb-footer__brand{min-width:0}.hb-footer__brand p{color:var(--muted-foreground);margin:12px 0 16px;max-width:38ch}
.hb-social{display:flex;gap:8px;flex-wrap:wrap}
.hb-social a{width:2.5rem;height:2.5rem;border-radius:var(--r-sm);border:1px solid var(--border);background:var(--card);display:grid;place-items:center;color:var(--muted-foreground);transition:color .15s,border-color .15s,transform .25s var(--ease)}
.hb-social a:hover{color:var(--foreground);border-color:var(--accent-line);transform:translateY(-2px)}
.hb-footer__bottom{margin-top:clamp(22px,4vw,34px);padding-top:16px;border-top:1px solid var(--border);color:var(--subtle-foreground);display:flex;gap:6px 18px;flex-wrap:wrap;justify-content:space-between}
@media (max-width:760px){.hb-footer__grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hb-footer__brand{grid-column:1/-1}}
@media (max-width:360px){.hb-footer__grid{grid-template-columns:minmax(0,1fr)}}

/* ── příkazová paleta (Ctrl/⌘ + K) ── */
.hb-pal{position:fixed;inset:0;z-index:9700;background:var(--overlay);display:grid;place-items:start center;padding:clamp(48px,12vh,120px) var(--gutter) var(--gutter);animation:hbFade .15s}
.hb-pal__box{width:min(620px,100%);background:var(--popover);color:var(--popover-foreground);border:1px solid var(--border-strong);border-radius:var(--r-md);box-shadow:var(--shadow-lg);overflow:hidden;animation:hbPop .2s var(--ease)}
.hb-pal__in{display:flex;align-items:center;gap:12px;padding:0 16px;border-bottom:1px solid var(--border);color:var(--muted-foreground)}
.hb-pal__in input{flex:1;min-width:0;background:none;border:0;outline:0;padding:16px 0;font-size:1rem;color:var(--foreground)}
.hb-pal__list{max-height:min(52vh,420px);overflow:auto;padding:6px;margin:0;list-style:none}
.hb-pal__list li{display:flex;align-items:center;gap:12px;padding:.6rem .7rem;border-radius:calc(var(--r-sm) - 1px);cursor:pointer}
.hb-pal__list li>span{flex:1;min-width:0;overflow-wrap:anywhere}
.hb-pal__list li .ic{color:var(--muted-foreground)}.hb-pal__list li small{margin-left:auto;color:var(--subtle-foreground);text-align:right}
.hb-pal__list li[aria-selected="true"]{background:var(--accent-soft)}.hb-pal__list li[aria-selected="true"] .ic{color:var(--accent)}
.hb-pal__empty{cursor:default!important;color:var(--muted-foreground)}
.hb-pal__foot{display:flex;gap:6px 16px;flex-wrap:wrap;padding:9px 16px;border-top:1px solid var(--border);color:var(--subtle-foreground);font-size:.78rem}
@media (max-width:560px){.hb-pal__foot{display:none}.hb-pal__list li small{display:none}}
