/* Instagram-style Profile */
    .profile-container {
      width: min(100%, 430px);
      margin-inline: auto;
      padding: 0;
    }
    
    .profile-header {
      display: flex;
      align-items: center;
      gap: 20px;
      padding: 16px 14px;
    }
    
    .profile-avatar-wrap {
      flex: 0 0 auto;
    }
    
    .profile-avatar {
      width: 86px;
      height: 86px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid var(--line);
      background: var(--bg-soft);
    }
    
    .profile-avatar-empty {
      display: grid;
      place-items: center;
      color: var(--muted);
      font-size: 32px;
    }
    
    .profile-stats-row {
      flex: 1;
      display: flex;
      justify-content: space-around;
      gap: 12px;
    }
    
    .profile-stat {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
    }
    
    .profile-stat-value {
      font-size: 18px;
      font-weight: 900;
      color: var(--ink);
      line-height: 1.2;
    }
    
    .profile-stat-label {
      font-size: 12px;
      color: var(--muted);
      font-weight: 500;
    }
    
    .profile-info {
      padding: 0 14px 12px;
      display: grid;
      gap: 4px;
    }
    
    .profile-name {
      margin: 0;
      font-size: 14px;
      font-weight: 900;
      color: var(--ink);
      line-height: 1.3;
    }
    
    .profile-category {
      font-size: 12px;
      color: var(--muted);
      font-weight: 500;
      padding: 2px 8px;
      background: rgba(248,113,113,.08);
      border-radius: 6px;
      display: inline-block;
      width: fit-content;
    }
    
    .profile-bio {
      margin: 4px 0 0;
      font-size: 13px;
      color: var(--ink);
      line-height: 1.5;
      white-space: pre-wrap;
    }
    
    .profile-location {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: var(--muted);
      margin-top: 4px;
    }
    
    .profile-location i {
      font-size: 11px;
    }
    
    .profile-actions {
      display: flex;
      gap: 6px;
      padding: 0 14px 12px;
    }
    
    .profile-action-btn {
      flex: 1;
      min-height: 32px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--ink);
      font-size: 13px;
      font-weight: 700;
      padding: 6px 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: all .15s ease;
    }
    
    .profile-action-btn i {
      font-size: 12px;
    }
    
    .profile-action-primary {
      background: linear-gradient(135deg, var(--primary), var(--primary-2));
      color: #fff;
      border-color: transparent;
    }
    
    .profile-action-edit {
      background: var(--panel-strong);
    }
    
    .profile-action-following {
      background: var(--panel-strong);
      border-color: var(--line);
    }
    
    .profile-action-secondary {
      flex: 0 0 auto;
      min-width: 32px;
      padding: 6px;
    }
    
    .profile-action-btn:active {
      transform: scale(0.97);
    }
    
    .profile-tabs {
      display: flex;
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      background: var(--panel);
    }
    
    .profile-tab {
      flex: 1;
      min-height: 44px;
      border: 0;
      background: transparent;
      color: var(--muted);
      font-size: 16px;
      display: grid;
      place-items: center;
      position: relative;
      transition: color .15s ease;
    }
    
    .profile-tab.active {
      color: var(--ink);
    }
    
    .profile-tab.active::after {
      content: "";
      position: absolute;
      bottom: -1px;
      left: 0;
      right: 0;
      height: 2px;
      background: var(--ink);
    }
    
    .profile-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 2px;
      background: var(--line);
    }
    
    .profile-grid-item {
      aspect-ratio: 1;
      border: 0;
      padding: 0;
      background: var(--bg-soft);
      position: relative;
      overflow: hidden;
    }
    
    .profile-grid-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    
    .profile-grid-empty {
      display: grid;
      place-items: center;
      color: var(--muted);
      font-size: 24px;
    }
    
    .profile-grid-overlay {
      position: absolute;
      top: 6px;
      right: 6px;
      width: 20px;
      height: 20px;
      display: grid;
      place-items: center;
      color: #fff;
      font-size: 10px;
      text-shadow: 0 1px 3px rgba(0,0,0,.5);
    }
    
    [dir="rtl"] .profile-grid-overlay {
      right: auto;
      left: 6px;
    }
    
    .profile-empty {
      grid-column: 1 / -1;
      padding: 60px 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      color: var(--muted);
    }
    
    .profile-empty i {
      font-size: 48px;
      opacity: .5;
    }
    
    .profile-empty p {
      margin: 0;
      font-size: 14px;
      font-weight: 600;
    }
    
    /* Hero Section - Personalized Greeting + Search */
    .hero-section {
      display: grid;
      gap: 16px;
      padding: 20px 0 16px;
    }
    
    .hero-greeting {
      display: grid;
      gap: 4px;
    }
    
    .hero-greeting-text {
      margin: 0;
      font-size: 28px;
      font-weight: 900;
      line-height: 1.2;
      color: var(--ink);
    }
    
    .hero-greeting-name {
      background: linear-gradient(135deg, var(--primary), var(--primary-2));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    
    .hero-greeting-subtitle {
      margin: 0;
      font-size: 14px;
      color: var(--muted);
      font-weight: 500;
    }
    
    .hero-search {
      display: grid;
      gap: 12px;
    }
    
    .hero-search-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      background: var(--panel-strong);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 12px 14px;
      box-shadow: 0 4px 12px rgba(127,29,29,.06);
      transition: all .2s ease;
    }
    
    .hero-search-bar:focus-within {
      border-color: var(--primary);
      box-shadow: 0 4px 20px rgba(248,113,113,.15);
    }
    
    .hero-search-icon {
      font-size: 16px;
      color: var(--muted);
      flex: 0 0 auto;
    }
    
    .hero-search-input {
      flex: 1;
      border: 0;
      background: transparent;
      color: var(--ink);
      font-size: 15px;
      font-weight: 500;
      outline: none;
      padding: 0;
    }
    
    .hero-search-input::placeholder {
      color: var(--muted);
    }
    
    .hero-search-btn {
      flex: 0 0 auto;
      width: 36px;
      height: 36px;
      border-radius: 10px;
      border: 0;
      background: linear-gradient(135deg, var(--primary), var(--primary-2));
      color: #fff;
      display: grid;
      place-items: center;
      font-size: 14px;
      transition: transform .15s ease;
    }
    
    .hero-search-btn:active {
      transform: scale(0.95);
    }
    
    .hero-categories {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      scrollbar-width: none;
      padding: 2px 0;
    }
    
    .hero-categories::-webkit-scrollbar {
      display: none;
    }
    
    .hero-category-chip {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--ink);
      font-size: 13px;
      font-weight: 700;
      white-space: nowrap;
      transition: all .15s ease;
    }
    
    .hero-category-chip i {
      font-size: 14px;
      color: var(--primary);
    }
    
    .hero-category-chip:active {
      transform: scale(0.97);
      background: rgba(248,113,113,.08);
    }

    .hero-category-chip.active {
      color: #fff;
      border-color: transparent;
      background: linear-gradient(135deg, var(--primary), var(--primary-2));
      box-shadow: 0 10px 24px rgba(248,113,113,.18);
    }

    .hero-category-chip.active i {
      color: #fff;
    }

    .stories-rail {
      margin: 0 -2px 12px;
    }

    .stories-strip {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      padding: 2px 2px 6px;
      scrollbar-width: none;
    }

    .stories-strip::-webkit-scrollbar {
      display: none;
    }

    .story-chip {
      width: 68px;
      flex: 0 0 68px;
      display: grid;
      justify-items: center;
      gap: 6px;
      border: 0;
      background: transparent;
      color: var(--ink);
      padding: 0;
    }

    .story-ring {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      padding: 3px;
      display: grid;
      place-items: center;
      background: conic-gradient(from 210deg, var(--primary), var(--primary-2), #facc15, var(--primary));
      color: #fff;
      overflow: hidden;
    }

    .story-ring img,
    .story-ring i {
      width: 100%;
      height: 100%;
      border: 2px solid var(--bg);
      border-radius: 50%;
      object-fit: cover;
      display: grid;
      place-items: center;
      background: var(--panel-strong);
    }

    .story-label {
      width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 11px;
      font-weight: 800;
      color: var(--muted);
      text-align: center;
    }

    .catalog-skeleton {
      display: grid;
      gap: 10px;
      padding: 8px 0 20px;
    }

    .catalog-skeleton div {
      min-height: 74px;
      border-radius: 18px;
      border: 1px solid var(--line);
      background:
        linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent),
        var(--panel);
      background-size: 220% 100%, auto;
      animation: catalogSkeleton 1.15s ease-in-out infinite;
    }

    @keyframes catalogSkeleton {
      0% { background-position: 120% 0, 0 0; }
      100% { background-position: -120% 0, 0 0; }
    }

    .catalog-scroll-sentinel {
      height: 1px;
    }

    .catalog-bottom-loader, .catalog-bottom-done {
      min-height: 54px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 12px 8px 18px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .catalog-bottom-spinner {
      width: 18px;
      height: 18px;
      border-radius: 999px;
      border: 2px solid color-mix(in srgb, var(--primary) 22%, transparent);
      border-top-color: var(--primary);
      animation: catalogBottomSpin .72s linear infinite;
    }

    @keyframes catalogBottomSpin {
      to { transform: rotate(360deg); }
    }