/* ============================================
   APP SHELL — Phase 1
   Header, Fullscreen Search, Sheet, Hamburger
   ============================================ */

/* --- CSS Variables --- */
:root {
  --header-height: 64px;
  --header-collapsed-height: 44px;
  --header-transition: 200ms ease;
  --shell-z-header: 40;
  --shell-z-search: 50;
  --shell-z-sheet: 45;
  --shell-z-hamburger: 200;
}

/* =====================
   1. APP HEADER
   ===================== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--shell-z-header);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  height: var(--header-height);
  transition: height var(--header-transition);
  padding-top: env(safe-area-inset-top, 0px);
}

.app-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Left group (hamburger + search) */
.app-header-left {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
}

/* Center (logo) */
.app-header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Right group (Axle + Me) */
.app-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}

.app-header-me-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  text-decoration: none;
}

/* Brand */
.app-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.app-header-logo {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all var(--header-transition);
}

.app-header-brand-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: white;
  white-space: nowrap;
  transition: opacity var(--header-transition), transform var(--header-transition);
}

/* Search Bar (expanded) */
.app-header-search {
  flex: 1;
  max-width: 480px;
  transition: opacity var(--header-transition), transform var(--header-transition);
}

.app-header-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.app-header-search-bar:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.app-header-search-bar i {
  font-size: 0.8rem;
}

/* Search Icon (collapsed — hidden by default) */
.app-header-search-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.app-header-search-icon:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Actions (legacy — kept for compatibility) */
.app-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.app-header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.app-header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.app-header-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.app-header-avatar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  background: transparent;
}

.app-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.app-header-avatar-initial {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-header-auth {
  display: flex;
  gap: 4px;
}

/* Hamburger button */
.app-header-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 2px;
  border-radius: 9999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  transition: color 0.15s ease, transform 0.18s ease;
}

.app-header-hamburger:hover {
  color: white;
}

.app-header-hamburger[aria-expanded='true'] {
  color: #fff;
}

/* Desktop only items */
.app-header-desktop-only {
  display: none;
}

@media (min-width: 768px) {
  .app-header-desktop-only {
    display: flex;
    align-items: center;
  }
  .app-header-hamburger {
    display: none;
  }
}

/* --- COLLAPSED STATE --- */
.app-header.header-collapsed {
  height: var(--header-collapsed-height);
}

.app-header.header-collapsed .app-header-logo {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
}

.app-header.header-collapsed .app-header-brand-text {
  opacity: 0;
  transform: translateX(-8px);
  width: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.app-header.header-collapsed .app-header-search {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  width: 0;
  overflow: hidden;
  flex: 0;
}

.app-header.header-collapsed .app-header-search-icon {
  display: flex;
}

/* Header spacer */
.app-header-spacer {
  height: var(--header-height);
  padding-top: env(safe-area-inset-top, 0px);
}

/* =====================
   2. FULLSCREEN SEARCH
   ===================== */
.fullscreen-search {
  position: fixed;
  inset: 0;
  z-index: var(--shell-z-search);
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
}

.fullscreen-search.hidden {
  display: none;
}

.fs-topbar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fs-form {
  flex: 1;
}

.fs-input-wrap {
  position: relative;
}

.fs-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.35);
  font-size: 0.85rem;
  pointer-events: none;
}

.fs-input-close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  border: none;
  background: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.fs-input-close i {
  font-size: 0.75rem;
}

.fs-input {
  width: 100%;
  padding: 11px 40px 11px 34px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  color: white;
  font-size: 1rem;
  outline: none;
}

.fs-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.fs-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.fs-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  -webkit-overflow-scrolling: touch;
}

.fs-section {
  margin-bottom: 28px;
}

.fs-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 12px;
}

.fs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fs-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.fs-chip:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.fs-chip i {
  font-size: 0.75rem;
}

.fs-recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s;
}

.fs-recent-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.fs-recent-item i {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
}

.fs-clear-recents {
  display: block;
  margin-top: 8px;
  padding: 6px 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.8rem;
  cursor: pointer;
}

.fs-clear-recents:hover {
  color: rgba(255, 255, 255, 0.6);
}

.fs-empty {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  padding: 8px 12px;
}

.fs-trending-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s;
}

.fs-trending-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.fs-trending-num {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

/* =====================
   3. UNIVERSAL SHEET
   ===================== */
#global-sheet {
  position: fixed;
  inset: 0;
  z-index: var(--shell-z-sheet);
  height: 100svh;
  overflow: hidden;
  pointer-events: none;
}

#global-sheet.sheet-open {
  pointer-events: auto;
}

#global-sheet.hidden {
  display: none;
}

.sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.sheet-open .sheet-overlay {
  pointer-events: auto;
}

.sheet-open .sheet-overlay {
  opacity: 1;
}

.sheet-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #111;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  transform: translateY(100%);
  transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  max-height: calc(100svh - env(safe-area-inset-top, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  will-change: transform;
}

.sheet-open .sheet-container {
  transform: translateY(0);
}

/* Sheet sizes (use svh to avoid keyboard/viewport jump on mobile) */
.sheet-sm { height: 30svh; }
.sheet-md { height: 50svh; }
.sheet-lg { height: 75svh; }
.sheet-full { height: 95svh; }

.sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 8px auto;
  flex-shrink: 0;
  cursor: grab;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.sheet-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

.sheet-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  border: none;
  cursor: pointer;
}

.sheet-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.sheet-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.sheet-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: sheet-spin 0.7s linear infinite;
}

@keyframes sheet-spin {
  to { transform: rotate(360deg); }
}

/* =====================
   4. HAMBURGER MENU
   ===================== */
.hamburger-menu {
  position: fixed;
  inset: 0;
  z-index: var(--shell-z-hamburger);
  pointer-events: none;
}

.hamburger-menu.hidden {
  display: none;
}

.hamburger-overlay {
  pointer-events: auto;
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + var(--header-height));
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 240ms ease;
}

.hamburger-open .hamburger-overlay {
  opacity: 1;
}

.hamburger-panel {
  pointer-events: auto;
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + var(--header-height));
  left: 0;
  right: 0;
  width: 100%;
  max-height: min(72vh, 640px);
  background: linear-gradient(180deg, rgba(18,18,18,0.98) 0%, rgba(10,10,10,0.98) 100%);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0 0 20px 20px;
  box-shadow: 0 20px 46px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  transform-origin: top center;
  transform: translateY(-18px);
  opacity: 0;
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), opacity 220ms ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hamburger-open .hamburger-panel {
  transform: translateY(0);
  opacity: 1;
}

.hamburger-open .hamburger-item {
  animation: menuItemSlide 280ms ease both;
}

.hamburger-header {
  height: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hamburger-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

.hamburger-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  border: none;
  cursor: pointer;
}

.hamburger-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.hamburger-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 0;
}

.hamburger-section {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hamburger-section:last-child {
  border-bottom: none;
}

.hamburger-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  padding: 8px 14px 4px;
}

.hamburger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px 14px 14px;
}

.hamburger-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.hamburger-item-card {
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 78px;
}

.hamburger-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.hamburger-item i {
  width: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.hamburger-item-card i {
  width: auto;
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
}

.hamburger-item-card span {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.82);
}

.hamburger-section-compact {
  padding-top: 2px;
  padding-bottom: 6px;
}

.hamburger-compact-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 4px 14px 10px;
}

.hamburger-item-compact {
  padding: 8px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  align-items: center;
  min-height: 56px;
}

.hamburger-item-compact i {
  width: auto;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.62);
}

.hamburger-item-compact span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.78);
  line-height: 1;
}

.hamburger-signout {
  color: rgba(239, 68, 68, 0.7);
}

.hamburger-signout:hover {
  color: #ef4444;
}

.hamburger-footer {
  margin-top: auto;
}

/* =====================
   5. RESPONSIVE
   ===================== */
@media (max-width: 480px) {
  .app-header-search {
    display: none;
  }
  .app-header-search-icon {
    display: flex;
  }
}


@keyframes menuItemSlide {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sheet responsive - wider on desktop */
@media (min-width: 768px) {
  .sheet-container {
    max-width: 560px;
    left: 50%;
    margin-left: -280px;
    border-radius: 16px 16px 0 0;
  }
}

/* Header inline expanding search (2026-02 polish) */
/* === Search Panel (mirrors hamburger) === */
.search-panel {
  position: fixed;
  top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  left: 0; right: 0; bottom: 0;
  z-index: 9998;
  pointer-events: none;
}
.search-panel.search-panel-open {
  pointer-events: auto;
}
.search-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 260ms ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.search-panel-open .search-panel-overlay {
  opacity: 1;
}
.search-panel-body {
  position: absolute;
  top: 0;
  left: 0; right: 0;
  max-height: calc(80vh - var(--header-height));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #111114;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
}
.search-panel-open .search-panel-body {
  transform: translateY(0);
  opacity: 1;
}
.search-panel-input-wrap {
  position: relative;
}
.search-panel-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.3);
  font-size: 14px;
  pointer-events: none;
}
.search-panel-input {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: white;
  padding: 0 14px 0 42px;
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
}
.search-panel-input:focus {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
}
.search-panel-input::placeholder { color: rgba(255,255,255,0.3); }
.search-panel-quick { padding: 4px 0 12px; }
.search-panel-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  text-decoration: none;
  transition: background 0.15s;
}
.search-panel-link:active { background: rgba(255,255,255,0.05); }
.search-panel-link i { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.spl-title { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.85); }
.spl-sub { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 1px; }
.search-panel-results { padding-bottom: 8px; }

/* === Me Panel === */
.me-panel {
  position: fixed;
  top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  left: 0; right: 0; bottom: 0;
  z-index: 9998;
  pointer-events: none;
}
.me-panel.me-panel-open {
  pointer-events: auto;
}
.me-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 260ms ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.me-panel-open .me-panel-overlay { opacity: 1; }
.me-panel-body {
  position: absolute;
  top: 0; right: 0;
  width: min(320px, 85vw);
  max-height: calc(85vh - var(--header-height));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #111114;
  border-bottom-left-radius: 16px;
  border-left: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transform: translateX(20px);
  opacity: 0;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
}
.me-panel-open .me-panel-body {
  transform: translateX(0);
  opacity: 1;
}
.me-panel-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 10px;
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.15s;
}
.me-panel-item:active { background: rgba(255,255,255,0.05); }
.me-panel-item > i { width: 22px; text-align: center; font-size: 15px; flex-shrink: 0; }
.me-panel-title { font-size: 14px; color: rgba(255,255,255,0.75); font-weight: 500; }
.me-panel-sub { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 1px; }
.me-panel-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
  transition: all 0.15s;
}
.me-panel-feature:active { background: rgba(255,255,255,0.06); }

/* === Axle Mini Chat Panel === */
.axle-panel {
  position: fixed;
  top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  left: 0; right: 0; bottom: 0;
  z-index: 9998;
  pointer-events: none;
}
.axle-panel.axle-panel-open {
  pointer-events: auto;
}
.axle-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 260ms ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.axle-panel-open .axle-panel-overlay { opacity: 1; }
.axle-panel-body {
  position: absolute;
  top: 0; right: 0;
  width: min(380px, 92vw);
  max-height: calc(70vh - var(--header-height));
  display: flex;
  flex-direction: column;
  background: #0d0d10;
  border-bottom-left-radius: 20px;
  border-left: 1px solid rgba(52,211,153,0.12);
  border-bottom: 1px solid rgba(52,211,153,0.12);
  transform: translateY(-16px);
  opacity: 0;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
  overflow: hidden;
}
.axle-panel-open .axle-panel-body {
  transform: translateY(0);
  opacity: 1;
}
.axle-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.axle-mini-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  min-height: 120px;
  max-height: calc(50vh - 140px);
}
.axle-mini-welcome {
  text-align: center;
  padding: 20px 10px;
}
.axle-mini-bubble {
  margin-bottom: 10px;
  max-width: 88%;
  animation: axleFadeIn 200ms ease;
}
@keyframes axleFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.axle-mini-bubble.user {
  margin-left: auto;
}
.axle-mini-bubble.user .axle-mini-bubble-inner {
  background: rgba(99,102,241,0.2);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 16px 16px 4px 16px;
  padding: 10px 14px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  line-height: 1.5;
}
.axle-mini-bubble.axle .axle-mini-bubble-inner {
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.1);
  border-radius: 16px 16px 16px 4px;
  padding: 10px 14px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  line-height: 1.5;
}
.axle-mini-typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
}
.axle-mini-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34d399;
  opacity: 0.4;
  animation: axleDot 1.2s infinite;
}
.axle-mini-typing span:nth-child(2) { animation-delay: 0.2s; }
.axle-mini-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes axleDot {
  0%, 80%, 100% { opacity: 0.4; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.2); }
}
.axle-mini-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.axle-mini-input {
  flex: 1;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: white;
  padding: 0 14px;
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
}
.axle-mini-input:focus {
  border-color: rgba(52,211,153,0.3);
  background: rgba(255,255,255,0.06);
}
.axle-mini-input::placeholder { color: rgba(255,255,255,0.25); }
.axle-mini-send {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #34d399, #059669);
  color: white;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.axle-mini-send:active { transform: scale(0.92); }
.axle-mini-send:disabled { opacity: 0.4; }

/* Browse chips grid */
.spl-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 12px;
}
.spl-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.spl-chip:active {
  background: rgba(255,255,255,0.08);
  transform: scale(0.97);
}
.spl-chip i { font-size: 13px; }
.spl-chip span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
}

/* Legacy search overlay (unused) */
.search-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 200ms ease, transform 200ms ease;
  padding-top: env(safe-area-inset-top, 0px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.app-header.search-open .search-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.search-overlay-active {
  overflow: hidden;
}

.search-overlay-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

/* Search Input */
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 16px;
  color: rgba(255,255,255,0.4);
  font-size: 15px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: white;
  padding: 0 48px 0 44px;
  font-size: 17px;
  outline: none;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}

.search-input:focus {
  border-color: rgba(255,255,255,0.25);
}

.search-input::placeholder {
  color: rgba(255,255,255,0.35);
}

.search-close-btn {
  position: absolute;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background 0.15s;
}

.search-close-btn:active {
  background: rgba(255,255,255,0.15);
}

/* Quick Links */
.search-quick-links {
  margin-top: 20px;
}

.search-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
  padding: 0 4px 10px;
}

.search-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.search-quick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
  transition: all 0.15s;
}

.search-quick-item:active {
  background: rgba(255,255,255,0.08);
  transform: scale(0.98);
}

.search-quick-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.search-quick-item span {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
}

/* Search Results */
.search-results {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.15s;
}

.search-result-item:active {
  background: rgba(255,255,255,0.06);
}

.search-result-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 15px;
  flex-shrink: 0;
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 15px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-type {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.search-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  margin-top: 4px;
  border-radius: 14px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.15);
  color: #60a5fa;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.search-view-all:active {
  background: rgba(59,130,246,0.15);
}

.search-no-results {
  text-align: center;
  padding: 32px 16px;
  color: rgba(255,255,255,0.35);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
