/* ==========================================================================
   Vyoma Pocket — Elevated Native-Feel Mobile UI Stylesheet
   ========================================================================== */

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
  }

  *, *::before, *::after {
    box-sizing: border-box;
  }

  .container {
    padding: 0 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Mobile Sticky Header */
  .site-header {
    background: var(--header-bg);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
  }
  .site-header__inner {
    height: 60px;
  }
  .logo__word {
    font-size: 18px;
  }
  .logo__sub {
    font-size: 9.5px;
  }
  .logo__mark {
    width: 34px;
    height: 34px;
  }
  .logo__mark--img img {
    width: 34px;
    height: 34px;
  }
  .primary-nav {
    display: none; /* Controlled cleanly via bottom quick navigation */
  }

  .live-users-pill {
    padding: 4px 10px;
    font-size: 11px;
  }

  /* Mobile Hero Section */
  .hero {
    padding: 24px 0 20px;
  }
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  .hero__badge-wrap {
    margin-bottom: 14px;
    padding: 5px 12px;
  }
  .hero__badge-text {
    font-size: 11.5px;
  }
  .hero__title {
    font-size: 32px;
    line-height: 1.12;
    margin-bottom: 12px;
  }
  .hero__sub {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 20px;
  }
  .hero__ctas {
    justify-content: center;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .hero__ctas .btn {
    width: 100%;
    height: 48px;
    font-size: 15px;
  }

  /* Mobile Mascot Stage — Clean & Unobstructed */
  .mascot-stage {
    margin: 14px auto 4px;
    min-height: auto;
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }
  .mascot-stage__glow {
    width: 200px;
    height: 200px;
    filter: blur(34px);
  }
  .mascot-stage__mascot {
    max-height: 200px;
    width: auto;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 10px 20px rgba(22, 18, 14, 0.12));
  }
  .mascot-speech {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    transform: none !important;
    margin: 0 auto 12px;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    white-space: normal;
    text-align: center;
    max-width: 90%;
  }
  .mascot-speech::after {
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%) rotate(45deg);
  }

  .mascot-chips-wrap {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
    width: 100%;
    z-index: 5;
    position: relative;
  }
  .mascot-chips-wrap .float-chip {
    position: static !important;
    animation: none !important;
    transform: none !important;
    font-size: 11.5px;
    padding: 6px 12px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
  }

  /* Feature Grid on Mobile */
  .section {
    padding: 32px 0;
  }
  .section-head {
    margin-bottom: 22px;
  }
  .section-head h2 {
    font-size: 22px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .feature-card {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
  }

  /* Store Mobile Layout */
  .store-intro {
    padding: 20px 0 12px;
  }
  .store-intro h1 {
    font-size: 26px;
  }
  .store-banner {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px 0;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
  }
  .store-banner__text {
    padding-bottom: 6px;
  }
  .store-banner__text h2 {
    font-size: 20px;
  }
  .store-banner__visual img {
    max-height: 140px;
  }

  .search-container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
  }
  .search-bar {
    width: 100%;
    height: 46px;
  }
  .search-bar__hotkey {
    display: none; /* Hide keyboard shortcut indicator on touch */
  }
  .sort-select {
    width: 100%;
    height: 46px;
  }

  .category-filter {
    padding: 2px 0 14px;
    gap: 6px;
  }
  .cat-pill {
    padding: 7px 14px;
    font-size: 12.5px;
  }

  /* Mobile App Cards (Clean 1-Line Hierarchy with Truncation) */
  .app-row {
    padding: 12px 14px;
    gap: 12px;
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    min-width: 0;
  }
  .app-row__rank {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 900;
    color: var(--orange-dark);
    min-width: 26px;
    text-align: center;
    flex-shrink: 0;
  }
  .app-row__icon {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 13px !important;
  }
  .app-row__info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }
  .app-row__name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
  }
  .app-row__name {
    font-size: 15px !important;
    font-weight: 800;
    line-height: 1.25 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ink);
    min-width: 0;
  }
  .app-row__version {
    font-size: 10.5px;
    padding: 2px 5px;
    flex-shrink: 0;
  }
  .app-row__desc {
    font-size: 12px !important;
    color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100% !important;
    margin-bottom: 4px;
  }
  .app-row__meta {
    display: flex;
    align-items: center;
    gap: 6px !important;
    font-size: 11px !important;
    flex-wrap: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .app-row__meta span {
    white-space: nowrap;
  }
  .app-row__action {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    flex-shrink: 0 !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--ink-soft);
    border: 1px solid var(--border);
  }

  /* App Detail Mobile — 100% Mobile Friendly */
  .app-detail {
    padding: 14px 0 40px;
  }
  /* Featured App Showcase Card Mobile (Banner on top, clean full width stack) */
  .app-hero-showcase {
    display: flex !important;
    flex-direction: column !important;
    border-radius: 20px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background: var(--surface-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
  }
  .app-hero-showcase__banner {
    order: -1 !important;
    width: 100%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
  }
  .app-hero-showcase__banner .banner-frame__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 220px;
    object-fit: cover;
    display: block;
  }
  .app-hero-showcase__info {
    padding: 18px 16px 20px;
    width: 100%;
    box-sizing: border-box;
  }
  .app-hero-showcase__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
  }
  .app-hero-showcase__actions .btn {
    width: 100%;
    height: 48px;
    font-size: 15px;
    justify-content: center;
  }
  .app-header-top {
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
  }
  .app-header-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
  }
  .app-header__icon {
    width: 68px !important;
    height: 68px !important;
    min-width: 68px !important;
    min-height: 68px !important;
    max-width: 68px !important;
    max-height: 68px !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 18px !important;
    background-size: cover !important;
    background-position: center !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1) !important;
  }
  .app-header__name {
    font-size: 20px !important;
    line-height: 1.22 !important;
    margin-bottom: 4px;
  }
  .app-header__publisher {
    font-size: 13px;
  }

  .app-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
    margin: 12px 0 16px;
  }
  .meta-pill {
    font-size: 11.5px;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
  }

  .app-install-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    width: 100%;
  }
  .app-install-row .btn-primary {
    width: 100%;
    height: 50px;
    font-size: 15px;
    justify-content: center;
  }
  .app-install-row .mobile-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .app-install-row .btn-secondary {
    width: 100%;
    height: 44px;
    font-size: 12.5px;
    justify-content: center;
    padding: 6px 8px;
  }

  .screens-gallery {
    gap: 12px;
    padding: 4px 0 14px;
  }
  .screen-frame {
    width: 170px;
    border-radius: 14px;
  }

  .platform-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .platform-card {
    padding: 14px;
  }

  /* Full-Width Mobile-Friendly Review Form & List */
  .reviews-section {
    padding: 20px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
  }
  .reviews-head {
    margin-bottom: 16px;
  }
  .review-form {
    padding: 18px 14px;
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
    background: var(--surface-card);
    border: 1px solid var(--border);
  }
  .review-form-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
  }
  input.review-input, .rating-select {
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
  }
  textarea.review-input {
    width: 100% !important;
    min-width: 0 !important;
    height: 100px !important;
    min-height: 100px !important;
    max-height: 220px !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    resize: vertical;
    margin-bottom: 12px !important;
    display: block !important;
  }
  .review-form button[type="submit"] {
    width: 100% !important;
    height: 48px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    border-radius: var(--radius-pill) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .review-card {
    padding: 16px 14px;
    border-radius: 14px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Admin Mobile Console */
  .admin-header {
    padding: 20px 0 14px;
  }
  .admin-title {
    font-size: 24px;
  }
  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .admin-stat-card {
    padding: 14px 12px;
    gap: 10px;
  }
  .admin-stat-icon {
    width: 38px;
    height: 38px;
  }
  .admin-stat-num {
    font-size: 20px;
  }
  .admin-form-panel {
    padding: 20px 14px;
    border-radius: var(--radius-lg);
  }
  .admin-table-panel {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px 12px;
    border-radius: var(--radius-lg);
  }
  .admin-tabs {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 8px !important;
    padding-bottom: 8px !important;
    margin-bottom: 18px !important;
    scrollbar-width: none !important;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab-btn {
    white-space: nowrap !important;
    padding: 9px 16px !important;
    font-size: 13px !important;
    flex-shrink: 0 !important;
  }

  /* Brand Marquee on Mobile */
  .marquee {
    padding: 14px 0;
    max-width: 100%;
    overflow: hidden;
  }
  .marquee__track {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  }
  .marquee__group {
    gap: 18px;
    animation: marqueeScroll 22s linear infinite;
  }
  .marquee__item {
    font-size: 13px;
  }

  /* Mobile Footer */
  .site-footer {
    padding: 28px 0 20px;
  }
  .site-footer__inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    align-items: center;
  }
  .site-footer__meta {
    font-size: 12px;
    text-align: center;
    line-height: 1.5;
  }

  /* Mobile Floating Bottom Bar */
  .mobile-quick-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--mobile-nav-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid var(--border);
    padding: 6px 12px max(10px, env(safe-area-inset-bottom, 10px));
    z-index: 100;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  }
  .mobile-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    transition: all 180ms ease;
  }
  .mobile-quick-btn.is-active {
    color: var(--orange-dark);
    background: var(--orange-soft);
  }
  .mobile-quick-btn svg {
    width: 20px;
    height: 20px;
  }

  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 16px));
  }
}
