/* Scoped notification center: compact horizontal identity rail, warm iBiker UI. */
.hb-inbox{min-width:0;color:var(--text);--hb-inbox-accent:var(--orange,#fb681a)}
.hb-inbox-tab-strip{
  display:flex;align-items:stretch;gap:7px;overflow-x:auto;overflow-y:hidden;
  padding:2px 1px 10px;margin:4px -2px 9px;scroll-snap-type:x proximity;
  scroll-padding-inline:2px;scrollbar-width:thin;-webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;touch-action:pan-x;
}
.hb-inbox-tab{
  flex:0 0 auto;min-height:39px;max-width:min(62vw,188px);display:inline-flex;align-items:center;
  gap:7px;padding:7px 11px;border:1px solid var(--line,#d9d6d1);border-radius:12px;
  color:var(--muted,#666);background:var(--panel,#fff);font:inherit;font-size:12px;
  font-weight:750;line-height:1.1;cursor:pointer;scroll-snap-align:start;
  transition:border-color .16s ease,background .16s ease,color .16s ease;
}
.hb-inbox-tab:hover{border-color:color-mix(in srgb,var(--hb-inbox-accent) 52%,var(--line,#ddd))}
.hb-inbox-tab.active{
  background:color-mix(in srgb,var(--hb-inbox-accent) 9%,var(--panel,#fff));
  border-color:var(--hb-inbox-accent);color:var(--text);box-shadow:inset 0 -2px 0 var(--hb-inbox-accent);
}
.hb-inbox-tab-icon{width:16px;height:16px;display:inline-grid;place-items:center;flex:none}
.hb-inbox-tab-icon svg{width:16px;height:16px;stroke-width:1.9}
.hb-inbox-tab-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:145px}
.hb-inbox-tab-count{
  display:inline-grid;place-items:center;min-width:19px;height:19px;flex:none;
  padding:0 5px;border-radius:99px;color:#fff;background:var(--hb-inbox-accent);
  font-size:10px;font-weight:850;font-variant-numeric:tabular-nums
}
.hb-inbox-tab-count[hidden]{display:none!important}
.hb-inbox-toolbar{display:flex;align-items:center;gap:8px;margin:2px 0 11px;padding:3px 1px}
.hb-inbox-toolbar [data-inbox-scope-title]{font-size:12px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:42%}
.hb-inbox-toolbar [data-notif-unread-label]{color:var(--muted,#666);font-size:11px;white-space:nowrap}
.hb-inbox-toolbar button{
  margin-left:auto;flex:none;border:0;background:transparent;color:var(--hb-inbox-accent);
  padding:4px 0;font:inherit;font-size:11px;font-weight:800;cursor:pointer
}
.hb-inbox-toolbar button:disabled{opacity:.45;cursor:default}
.hb-inbox-panels{min-width:0}
.hb-inbox-pane[hidden]{display:none!important}
.hb-inbox-scroll{
  overflow-x:hidden;overflow-y:auto;min-height:164px;max-height:min(54dvh,570px);
  padding:1px 3px 8px 1px;scrollbar-gutter:stable;overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch
}
.hb-inbox-rows{display:grid;gap:7px;min-width:0}
.hb-inbox-row{min-width:0;position:relative}
.hb-inbox-row .avatar{flex:0 0 42px;width:42px;height:42px;object-fit:cover}
.hb-inbox-row .grow{min-width:0}
.hb-inbox-row .grow strong{overflow-wrap:anywhere}
.hb-inbox-context{
  color:var(--hb-inbox-accent);font-weight:750;letter-spacing:.015em;
  display:inline-block;max-width:150px;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis;vertical-align:bottom
}
.hb-inbox-more{
  display:block;width:100%;padding:11px 12px;margin-top:10px;border-radius:13px;
  border:1px solid var(--line,#ddd);background:var(--panel,#fff);
  color:var(--text);font:inherit;font-weight:750;font-size:12px;cursor:pointer
}
.hb-inbox-more:hover{border-color:var(--hb-inbox-accent)}
.hb-inbox-more[hidden]{display:none!important}
.hb-inbox-empty,.hb-inbox-loading,.hb-inbox-no-scopes{
  color:var(--muted,#777);padding:32px 16px;text-align:center;font-size:12px;line-height:1.45
}
.hb-inbox-error{border:1px solid #e0b296;border-radius:11px;background:#fff7f0;color:#853c12;
  font-size:12px;padding:10px 12px;margin-bottom:10px}
.hb-inbox-retry{
  display:block;margin:7px auto 0;border:0;background:transparent;color:var(--hb-inbox-accent);
  font:inherit;font-size:11px;font-weight:750;cursor:pointer
}
.hb-inbox-retry:not(:focus-visible){opacity:.72}
.hb-inbox [hidden]{display:none!important}
.hb-inbox-tab:focus-visible,.hb-inbox-more:focus-visible,.hb-inbox-toolbar button:focus-visible,
.hb-inbox-retry:focus-visible{outline:2px solid var(--hb-inbox-accent);outline-offset:2px}
@media(max-width:390px){
  .hb-inbox-tab{max-width:165px;padding:7px 9px;gap:5px}
  .hb-inbox-toolbar [data-inbox-scope-title]{max-width:32%}
  .hb-inbox-scroll{max-height:50dvh}
  .hb-inbox-row{gap:7px}
}
@media(prefers-reduced-motion:reduce){
  .hb-inbox-tab{transition:none}
  .hb-inbox-tab-strip{scroll-behavior:auto}
}

/* Notification handoff: keep the inbox mounted until the destination is ready. */
#modal[data-hibiker-notifications="1"] .modal-card{
  animation:hb-inbox-sheet-enter .19s cubic-bezier(.22,.8,.22,1) both;
}
#modal[data-hibiker-notifications="1"].hb-inbox-dismissing{
  animation:hb-inbox-sheet-exit .13s ease-in both;
  pointer-events:none;
}
.hb-inbox.is-opening .hb-inbox-row:not(.is-opening){pointer-events:none}
.hb-inbox-row.is-opening{border-color:var(--hb-inbox-accent);pointer-events:none}
.hb-inbox-row.is-opening .notification-arrow{opacity:0}
.hb-inbox-row.is-opening::after{
  content:"";position:absolute;right:15px;top:50%;width:15px;height:15px;
  margin-top:-8px;border:2px solid color-mix(in srgb,var(--hb-inbox-accent) 23%,transparent);
  border-top-color:var(--hb-inbox-accent);border-radius:50%;
  animation:hb-inbox-spin .75s linear infinite;pointer-events:none;
}
@keyframes hb-inbox-sheet-enter{
  from{opacity:.92;transform:translate3d(0,9px,0)}
  to{opacity:1;transform:translate3d(0,0,0)}
}
@keyframes hb-inbox-sheet-exit{from{opacity:1}to{opacity:0}}
@keyframes hb-inbox-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){
  #modal[data-hibiker-notifications="1"] .modal-card,
  #modal[data-hibiker-notifications="1"].hb-inbox-dismissing,
  .hb-inbox-row.is-opening::after{animation:none}
}
