.mobile-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.mobile-hamburger:active {
  opacity: 0.6;
}

.mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
  animation: mob-overlay-in 0.2s ease;
}

@keyframes mob-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mobile-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 80vw);
  background: #fff;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  animation: mob-drawer-slide 0.25s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@keyframes mob-drawer-slide {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-drawer__header strong {
  font-size: 0.92rem;
  color: var(--text);
}

.mobile-drawer__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  font-size: 1.25rem;
}

.mobile-drawer__close:hover {
  background: #f1f5f9;
}

.mobile-drawer__links {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.mobile-drawer__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  background: none;
  cursor: pointer;
  transition: background 0.12s;
}

.mobile-drawer__link:hover,
.mobile-drawer__link.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.mobile-drawer__section {
  padding: 14px 20px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
}

.mobile-drawer__section:first-child {
  border-top: none;
  margin-top: 0;
}

@media (max-width: 768px) {
  .fy-hero {
    display: none !important;
  }
  .mobile-hamburger {
    display: flex;
  }

  .mobile-drawer-overlay.is-open {
    display: block;
  }

  .site-header {
    min-height: auto !important;
    max-height: 48px !important;
    contain: style;
  }

  .site-header__avatar-ring {
    display: block;
  }

  .site-header__inner {
    min-height: 44px !important;
    max-height: 44px;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 8px;
    width: calc(100% - 20px);
  }

  .site-header__brand {
    width: auto;
  }

  .site-header__brandMark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.95rem;
  }

  .site-header__brandLogo {
    max-height: 30px;
    max-width: 100px;
  }

  .site-header__brandText {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .site-header__brandText strong {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
  }

  .site-header__brandText small {
    display: none;
  }

  .site-header__nav {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .site-header__link {
    display: none !important;
  }

  .site-header__more {
    display: none !important;
  }

  .site-header__bell-wrap,
  .site-header__dropdown {
    display: inline-flex;
  }

  .site-header__dropdown-backdrop {
    background: rgba(0, 0, 0, 0.4);
    animation: dropdown-backdrop-fade 0.2s ease;
  }

  @keyframes dropdown-backdrop-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .site-header__dropdown-menu {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    min-width: 100%;
    max-width: none;
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px 16px 0 0;
    border: none;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 10001;
    animation: dropdown-slide-up 0.25s cubic-bezier(0.32, 0, 0, 1);
  }

  .site-header__dropdown-menu::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    margin: 10px auto 8px;
  }

  @keyframes dropdown-slide-up {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .site-header__dropdown-avatar {
    padding: 12px 0 8px;
  }

  .site-header__dropdown-avatar-img {
    width: 64px;
    height: 64px;
  }

  .site-header__dropdown-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid #f1f5f9;
  }

  .site-header__dropdown-item--file {
    padding: 14px 20px;
    font-size: 1rem;
  }

  .site-header__dropdown-item--danger {
    border-bottom: none;
    margin-top: 4px;
    border-top: 1px solid #fee2e2;
  }

  .site-header__dropdown-section {
    padding: 12px 20px 14px;
    border-bottom: 1px solid #f1f5f9;
  }

  .site-header__dropdown-section-label {
    font-size: 0.78rem;
    margin-bottom: 8px;
  }

  .site-header__dropdown-select {
    padding: 12px 14px;
    font-size: 0.95rem;
    min-height: 44px;
  }

  .site-footer {
    display: none;
  }

  .site-main {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  .market-shell {
    width: 100%;
    padding: 0 0 16px;
    gap: 0;
    min-height: calc(100vh - 60px);   /* mobile: viewport minus bottom tabs */
  }

  .seller-page { gap: 6px !important; }

  .market-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 18px 16px;
    margin-bottom: 8px;
    box-shadow: none;
  }

  .market-card::before {
    display: none;
  }

  .market-card--nested {
    border-radius: var(--radius-md);
    padding: 14px;
  }

  .market-card__header {
    gap: 10px;
    margin-bottom: 14px;
  }

  .market-card__header h1 {
    font-size: 1.15rem;
  }

  .market-list {
    gap: 0;
  }

  .market-list__item {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid rgba(191, 219, 254, 0.5);
    padding: 14px 16px;
    gap: 12px;
  }

  .market-list__content {
    flex-direction: column;
    gap: 10px;
  }

  .market-list__content .market-list__thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    min-width: 0;
    max-width: 100%;
    max-height: none;
    border-radius: var(--radius-md);
    object-fit: cover;
  }

  .market-list__item h3 {
    font-size: 1rem;
  }

  .market-grid--cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .market-tile {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .market-input {
    padding: 11px 12px;
    font-size: 0.93rem;
  }

  .market-input--textarea {
    min-height: 100px;
  }

  .market-label {
    font-size: 0.88rem;
  }

  .market-button {
    padding: 11px 16px;
    font-size: 0.9rem;
  }

  .market-media-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 4px;
  }

  .market-media-grid__image {
    border-radius: 4px;
  }

  .market-hours-section:not([open]) .market-hours {
    display: none;
  }

  .market-hours__row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
    justify-items: stretch;
    text-align: left;
  }

  .market-search-result-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .market-seller-header {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .market-chat-window {
    left: 0;
    right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    height: calc(100vh - 52px - 56px - env(safe-area-inset-bottom, 0px));
    border-radius: 0;
  }

  .market-chat-fab {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .market-lightbox__viewport {
    width: 96vw;
  }

  .market-eyebrow {
    font-size: 0.72rem;
  }

  .market-profile-progress {
    padding: 14px;
  }

  .market-pagination {
    padding: 12px 16px;
  }

  .site-notif-dropdown {
    position: fixed;
    top: 52px;
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 52px - 70px);
    border-radius: 12px;
  }

  .market-suggest-category__form {
    padding: 12px;
  }

  .market-section-title {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .pj-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pj-card__body {
    padding: 14px 16px 12px;
  }

  .pj-card__title {
    font-size: 0.98rem;
  }

  .pj-card__btn {
    padding: 12px 16px;
    font-size: 0.86rem;
  }

  .buyer-account__list-item {
    flex-wrap: wrap;
  }

  .buyer-account__list-item .market-button--sm.market-button--danger {
    padding: 10px 20px;
    font-size: 0.84rem;
    min-height: 40px;
    border-radius: 10px;
    min-width: 90px;
  }
}

@media (max-width: 480px) {
  .market-card {
    padding: 14px 12px;
  }

  .market-card--nested {
    padding: 10px;
  }

  .market-card__header h1 {
    font-size: 1.05rem;
  }

  .market-card__header h2 {
    font-size: 0.95rem;
  }

  .market-grid--cards {
    grid-template-columns: 1fr;
  }

  .market-list__item {
    padding: 12px;
  }

  .market-list__content .market-list__thumb {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
  }

  .market-input {
    padding: 10px 10px;
    font-size: 0.9rem;
  }

  .market-button {
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .market-hours__row {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .market-category-tree__row--sub {
    padding-left: 16px;
  }

  .market-category-tree__row--leaf {
    padding-left: 32px;
  }
}

@media (max-width: 768px) {
  .market-grid--cards.market-category-stories {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding: 8px 16px;
    grid-template-columns: none;
  }

  .market-category-stories .market-tile {
    flex: 0 0 80px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 6px;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(124, 58, 237, 0.08));
    border: 2px solid rgba(124, 58, 237, 0.2);
  }

  .market-category-stories .market-tile strong {
    font-size: 0.65rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .market-category-stories .market-tile span {
    display: none;
  }

  .market-category-stories::-webkit-scrollbar {
    display: none;
  }

  .market-category-stories {
    scrollbar-width: none;
  }
}

.mobile-sticky-cta {
  display: none;
}

@media (max-width: 768px) {
  .mobile-sticky-cta {
    display: flex;
    position: fixed;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    z-index: 9980;
    padding: 10px 16px;
    gap: 10px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(191, 219, 254, 0.5);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  }

  .mobile-sticky-cta .market-button {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .market-checkbox {
    min-height: 44px;
  }

  .market-combobox__option {
    min-height: 44px;
  }

  a, button {
    min-height: 36px;
  }
}

@media (max-width: 768px) {
  .market-card,
  .market-list__item,
  .market-tile {
    transition: none;
  }

  .market-tile:hover,
  .market-button:hover {
    transform: none;
  }

  .market-tile:hover,
  .market-list__item:hover {
    border-color: rgba(191, 219, 254, 0.5);
  }
}
