/* FitMyCase — responsive composition and premium motion layer */
body.three-ready .hero-fallback-art { opacity: .16; transition: opacity .7s ease; }

@media (min-width: 900px) {
  .site-nav { padding-right: 14px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-name { font-size: 16px; }
  .nav-link { min-width: 74px; font-size: 12px; }
  .hero-content { transform: translateY(8px); }
  .process-step:nth-child(2) { transform: translateX(57px); }
  .process-step:nth-child(3) { transform: translateX(114px); }
  .process-step:nth-child(2)::before, .process-step:nth-child(3)::before { left: -14px; }
}

@media (max-width: 899px) {
  .menu-grid { grid-template-columns: 1fr 1fr; }
  .menu-group:last-child { grid-column: 1 / -1; }
  .guide-grid { grid-template-columns: 1fr 1fr; }
  .guide-card-case { grid-column: 1 / -1; min-height: 337px; }
  .guide-card-case .guide-art-case { right: 10%; }
  .footer-main { align-items: start; flex-direction: column; }
  .footer-main p { text-align: left; }
}

@media (max-width: 640px) {
  .site-nav { width: calc(100% - 24px); height: 59px; margin-top: 10px; padding: 0 8px 0 10px; gap: 5px; border-radius: 17px; }
  .site-header.is-scrolled .site-nav { height: 55px; margin-top: 7px; }
  .brand-lockup { gap: 7px; }
  .brand-mark { width: 33px; height: 33px; border-radius: 11px; }
  .brand-name { font-size: 13px; }
  .nav-center { gap: 0; margin-right: 0; }
  .nav-link { min-width: 0; padding: 8px 6px; font-size: 10px; }
  .menu-toggle { width: 37px; height: 37px; border-radius: 12px; }
  .menu-toggle span { width: 14px; }
  .menu-toggle span:last-child { width: 10px; margin-right: 10px; }

  .fullscreen-menu { padding: 11px; overflow-y: auto; overscroll-behavior: contain; }
  .menu-shell { min-height: calc(100vh - 22px); max-height: calc(100dvh - 22px); padding: 18px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border-radius: 24px; }
  .menu-content { padding: 48px 0 26px; }
  .menu-grid { grid-template-columns: 1fr; gap: 0; }
  .menu-group:last-child { grid-column: auto; }
  .menu-item { min-height: 47px; padding: 8px 0; }
  .menu-item span { font-size: 16px; }
  .menu-item small { display: none; }

  .hero { min-height: max(100svh, 645px); }
  .hero-content { width: calc(100% - 28px); padding-top: 54px; }
  .hero-kicker { font-size: 9px; }
  .hero h1 { margin: 16px auto 16px; font-size: clamp(38px, 11.4vw, 55px); letter-spacing: -.08em; line-height: .99; }
  .hero-description { max-width: 345px; font-size: 13px; line-height: 1.65; }
  .hero-search { height: 68px; margin-top: 28px; padding: 7px 5px 7px 15px; border-radius: 19px; }
  .hero-search-icon { width: 22px; height: 22px; flex-basis: 22px; }
  .hero-search-icon svg { width: 18px; height: 18px; }
  .hero-search-input { padding: 0 5px 0 9px; font-size: 13px; }
  .search-control { width: 41px; height: 41px; flex-basis: 41px; }
  .search-control svg { width: 18px; height: 18px; }
  .voice-control { margin-right: 0; }
  .qr-control { display: grid; }
  .search-pills { gap: 7px; margin-top: 14px; }
  .search-pill { min-height: 30px; padding: 6px 10px; font-size: 9px; }
  .scroll-cue { bottom: 16px; width: 22px; height: 35px; }
  .scroll-cue span { margin-top: 6px; }
  .fallback-one { top: 12%; left: -16%; width: 120px; height: 242px; border-width: 6px; border-radius: 28px; }
  .fallback-two { top: 58%; right: -14%; width: 88px; height: 180px; border-width: 5px; border-radius: 23px; }
  .fallback-glass { top: 17%; right: -7%; width: 88px; height: 174px; border-radius: 21px; }

  .section-shell { width: calc(100% - 32px); }
  .section-heading h2 { font-size: clamp(29px, 9vw, 40px); letter-spacing: -.07em; }
  .brand-network { padding-top: 80px; }
  .brand-heading { margin-bottom: 35px; }
  .brand-logo { width: 132px; height: 65px; padding: 0 24px; flex-basis: 132px; }
  .brand-logo img { max-width: 79px; max-height: 25px; }
  .brand-wordmark { font-size: 15px; }
  .nothing-mark { font-size: 11px; }
  .pixel-mark { font-size: 12px; }
  .lava-mark { font-size: 17px; }
  .iqoo-mark { font-size: 15px; }
  .tecno-mark { font-size: 13px; }

  .how-it-works { padding-top: 90px; }
  .process-line { margin-top: 50px; }
  .process-step { grid-template-columns: 65px 1fr; gap: 17px; min-height: 153px; padding-bottom: 39px; }
  .process-step:not(:last-child)::before { top: 46px; left: 26px; }
  .process-number { width: 53px; height: 46px; font-size: 10px; }
  .process-step h3 { margin: 2px 0 7px; font-size: 25px; }
  .process-step p { font-size: 13px; line-height: 1.65; }

  .latest-models { padding-top: 49px; }
  .section-heading-row { align-items: end; }
  .carousel-controls { gap: 6px; }
  .carousel-button { width: 36px; height: 36px; }
  .latest-carousel { gap: 10px; margin-top: 27px; padding-bottom: 13px; }
  .model-card { width: 77vw; min-height: 195px; padding: 18px; flex-basis: 77vw; border-radius: 16px; }
  .model-card h3, .model-card strong { font-size: 20px; }

  .guides { padding-top: 86px; }
  .guide-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 28px; }
  .guide-card, .guide-card-case { grid-column: auto; min-height: 270px; padding: 19px; border-radius: 17px; }
  .guide-index { top: 17px; left: 19px; }
  .guide-card h3 { max-width: 245px; font-size: 25px; }
  .guide-art-case { top: 42px; right: 26px; width: 120px; height: 156px; border-width: 6px; border-radius: 27px; }
  .guide-art-case::before { top: 17px; left: 17px; width: 33px; height: 33px; border-width: 4px; }
  .guide-art-case span { inset: 9px; border-radius: 17px; }
  .guide-art-glass { top: 37px; left: auto; right: 46px; width: 98px; height: 165px; border-radius: 22px; transform: rotate(-9deg); }
  .guide-art-shop { top: 45px; right: 46px; width: 96px; height: 96px; }

  .faq { padding-top: 92px; }
  .faq-list { margin-top: 33px; }
  .faq-item summary { padding: 18px 0; font-size: 14px; }
  .faq-item p { margin: -3px 33px 18px 0; font-size: 12px; }
  .faq-icon { width: 18px; height: 18px; flex-basis: 18px; }

  .community-vote-section { width: calc(100% - 32px); margin-top: 80px; }
  .final-cta { margin-top: 92px; padding: 42px 20px; border-radius: 20px; }
  .final-cta h2 { margin-bottom: 25px; font-size: clamp(31px, 9.5vw, 42px); }
  .cta-search-button { width: 100%; min-height: 54px; }
  .site-footer { width: calc(100% - 32px); margin-top: 79px; }
  .footer-main { gap: 15px; padding-bottom: 27px; }
  .footer-main p { max-width: 290px; font-size: 11px; }
  .footer-links { gap: 14px; padding: 17px 0 27px; }
  .footer-bottom { flex-direction: column; gap: 5px; }

  .search-page { padding: 89px 12px 40px; }
  .search-page-header { grid-template-columns: 40px 1fr; gap: 12px; margin: 0 5px 22px; }
  .search-page-header h1 { font-size: 29px; }
  .back-button { width: 39px; height: 39px; border-radius: 12px; }
  .search-switch { grid-column: 1 / -1; width: fit-content; margin-left: 52px; margin-top: -4px; }
  .search-workspace { padding: 15px; border-radius: 19px; }
  .search-field-large { min-height: 58px; padding-left: 13px; border-radius: 14px; }
  .search { height: 47px; padding-left: 10px; font-size: 14px; }
  .field-search-icon { width: 18px; height: 18px; flex-basis: 18px; }
  .clear-btn { right: 43px; }
  .mic-btn { right: 7px; width: 33px; height: 33px; }
  .search-toolbar { align-items: stretch; flex-direction: column; gap: 8px; margin-top: 17px; }
  .result-count { text-align: left; }
  .model-shortcuts { gap: 6px; margin: 19px 0 17px; padding: 11px 0; }
  .model-shortcuts > span { width: 100%; }
  .compatibility-result { padding: 17px 0; }
  .result-title { font-size: 16px; }
  .result-badge { font-size: 7px; }
  .result-fits { font-size: 12px; }
  .result-actions { flex-wrap: wrap; }
  .result-action { min-height: 29px; }

  .scanner-card, .community-card { padding: 21px; border-radius: 20px; }
  .community-card h2, .scanner-top h2 { font-size: 24px; }
  .community-close { top: 14px; right: 14px; }
}

@media (max-width: 359px) {
  .nav-link { padding-right: 4px; padding-left: 4px; font-size: 9px; }
  .brand-name { font-size: 12px; }
  .brand-mark { width: 30px; height: 30px; }
  .menu-toggle { width: 34px; height: 34px; }
  .hero h1 { font-size: 37px; }
  .hero-search-input { font-size: 12px; }
  .search-control { width: 38px; height: 38px; flex-basis: 38px; }
  .hero-search { padding-left: 11px; }
}

/* Responsive controls added without changing the existing page structure. */
@media (max-width: 640px) {
  .nav-actions { gap: 5px; }
  .theme-toggle { width: 37px; height: 37px; border-radius: 12px; }
  .theme-icon { width: 16px; height: 16px; }
  .hero-clear-control { width: 30px; height: 30px; flex-basis: 30px; }
  .hero-clear-control svg { width: 14px; height: 14px; }
  .hero-search-guidance { max-width: 315px; margin-top: 9px; font-size: 9px; }
  .search-pills { margin-top: 11px; }
  .menu-shell { padding-bottom: 22px; }
  .menu-topline { padding-bottom: 10px; }
  .menu-content { padding-top: 30px; }
  .menu-grid { gap: 9px; margin-top: 14px; }
  .menu-group { padding-top: 0; }
  .menu-item { min-height: 54px; padding: 9px 8px; border-radius: 14px; }
  .menu-item + .menu-item { margin-top: 2px; }
  .menu-item .menu-item-main { gap: 10px; }
  .menu-item .menu-item-icon { width: 28px; height: 28px; flex-basis: 28px; border-radius: 9px; }
  .menu-item .menu-item-icon svg { width: 14px; height: 14px; }
  .menu-item .menu-item-label { font-size: 15px; }
  .menu-item small { display: block; max-width: 112px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .hero-suggestion, .search-suggestion-row { min-height: 62px; }
  .suggestion-name { font-size: 12px; }
  .suggestion-meta { gap: 3px 6px; }
  .suggestion-availability { font-size: 7px; }
}

@media (max-width: 359px) {
  .nav-actions { gap: 3px; }
  .theme-toggle { width: 34px; height: 34px; }
  .hero-search-guidance { font-size: 8px; }
  .menu-item small { display: none; }
}
@media (max-width: 640px) {
  .hero-suggestions { max-height: 270px; }
  .search-suggestions { max-height: 300px; }
}
@media (max-width: 640px) {
  .search-complete-actions { gap: 6px; margin-bottom: 12px; }
  .search-complete-action { min-height: 32px; padding: 6px 8px; font-size: 9px; }
  .compatibility-result { margin-bottom: 9px; padding: 16px; border-radius: 14px; }
  .result-badges { gap: 4px; margin-top: 8px; }
  .result-badge { min-height: 20px; padding: 3px 6px; font-size: 7px; }
  .community-home-card::after { inset: 8px; border-radius: 14px; }
}

@media (max-width: 640px) {
  .hero-content { width: calc(100% - 28px); padding-top: 49px; }
  .hero h1 { max-width: 350px; margin-top: 14px; margin-bottom: 13px; font-size: clamp(35px, 10vw, 48px); }
  .hero-description { max-width: 335px; font-size: 13px; }
  .hero-search { height: 76px; margin-top: 25px; padding: 7px 6px 7px 16px; border-radius: 21px; }
  .hero-search-icon { width: 24px; height: 24px; flex-basis: 24px; }
  .hero-search-icon svg { width: 19px; height: 19px; }
  .hero-search-input { font-size: 14px; }
  .hero-search-guidance { max-width: 310px; font-size: 9px; }
  .search-overlay { align-items: start; padding: 10px; }
  .search-overlay-panel { width: 100%; max-height: calc(100dvh - 20px); min-height: calc(100dvh - 20px); padding: 20px 17px 26px; border-radius: 23px; }
  .search-overlay-header { padding-bottom: 14px; }
  .search-overlay-header h2 { font-size: 28px; }
  .overlay-close { width: 38px; height: 38px; flex-basis: 38px; border-radius: 12px; }
  .overlay-search-copy { margin: 13px 0 18px; font-size: 12px; }
  .overlay-search-field { min-height: 65px; padding-left: 14px; border-radius: 16px; }
  .overlay-search-field input { height: 49px; padding-left: 10px; font-size: 13px; }
  .overlay-search-tabs { margin-top: 12px; }
  .overlay-search-tab { min-height: 33px; padding: 7px 10px; font-size: 10px; }
  .overlay-suggestions { max-height: 39dvh; margin-top: 11px; }
  .overlay-suggestion { min-height: 62px; padding: 10px; }
  .overlay-discovery { gap: 16px; margin-top: 21px; }
  .overlay-discovery-group { padding-top: 14px; }
  .overlay-search-chip { min-height: 32px; font-size: 9px; }
}
@media (max-width: 640px) {
  .suggestion-brand-logo { width: 23px; height: 23px; flex-basis: 23px; }
  .suggestion-brand-logo img { width: 15px; height: 15px; }
}

@media (max-width: 640px) {
  .compatibility-selector-wrap { width: 100%; margin-top: 19px; }
  .compatibility-selector-title { margin-left: 1px; margin-bottom: 7px; font-size: 12px; }
  .compatibility-selector { gap: 3px; padding: 3px; border-radius: 15px; }
  .compatibility-selector .search-pill { min-height: 51px; padding: 8px 8px; gap: 6px; border-radius: 12px; font-size: 9px; line-height: 1.18; }
  .compatibility-selector .search-pill svg { width: 15px; height: 15px; flex-basis: 15px; }
  .compatibility-selector + .hero-search { margin-top: 13px; }
  .hero-search-guidance { max-width: 330px; margin-top: 9px; font-size: 9px; }
  .hero-compatibility-info { gap: 8px; margin-top: 10px; padding: 8px 9px; border-radius: 12px; }
  .hero-compatibility-icon { width: 27px; height: 27px; flex-basis: 27px; border-radius: 8px; }
  .hero-compatibility-icon svg { width: 14px; height: 14px; }
  .hero-compatibility-copy strong { font-size: 10px; }
  .hero-compatibility-copy > span { font-size: 8px; }
}
@media (max-width: 640px) { .suggestion-context { font-size: 7px; } }
@media (max-width: 640px) { a.brand-logo:active { transform: scale(.95); } }
@media (max-width: 640px) {
  .result-utility-grid { gap: 9px; margin-top: 14px; padding-top: 13px; }
  .result-related-action, .result-secondary-action { min-height: 29px; padding: 5px 8px; font-size: 8px; }
  .result-mini-empty { font-size: 10px; }
}
@media (max-width: 640px) { .final-cta h2 { max-width: 335px; font-size: clamp(28px, 8.3vw, 35px); } }
@media (max-width: 640px) {
  .nav-center { gap: 1px; margin-right: 5px; }
  .nav-link { min-width: 0; padding: 8px 6px; }
  .nav-actions { padding: 2px; border-radius: 13px; }
  .theme-toggle, .menu-toggle { width: 34px; height: 34px; border-radius: 10px; }
  .menu-toggle span { margin: 2.5px auto; }
  .menu-toggle span:last-child { margin-right: 10px; }
  .menu-group-more { padding-top: 8px; }
}

/* Navigation-only responsive pass. */
@media (max-width: 640px) {
  .site-nav { height: 58px; margin-top: 9px; padding: 0 8px 0 10px; gap: 7px; border-radius: 17px; }
  .site-header.is-scrolled .site-nav { height: 53px; margin-top: 7px; }
  .brand-lockup { min-width: 0; }
  .nav-center { gap: 1px; margin-right: 4px; }
  .nav-link { min-width: 0; min-height: 36px; padding: 7px 6px 9px; font-size: 10px; }
  .nav-link::after { right: 8px; bottom: 4px; left: 8px; }
  .nav-actions { height: 38px; padding: 2px; border-radius: 12px; }
  .nav-action-button { width: 34px; height: 34px; flex-basis: 34px; border-radius: 9px; }
  .nav-action-button svg { width: 16px; height: 16px; }
  .menu-toggle span:first-child { top: 12px; }
  .menu-toggle span:last-child { top: 20px; }
  .menu-toggle[aria-expanded="true"] span:first-child, .menu-toggle[aria-expanded="true"] span:last-child { top: 16px; }
}
@media (max-width: 359px) {
  .site-nav { gap: 4px; }
  .nav-link { padding-right: 4px; padding-left: 4px; font-size: 9px; }
  .nav-actions { padding: 2px; }
  .nav-action-button { width: 31px; height: 31px; flex-basis: 31px; }
  .brand-name { font-size: 12px; }
}
@media (max-width: 640px) {
  .nav-actions { grid-template-columns: repeat(3, 34px); gap: 2px; height: 38px; padding: 2px; border-radius: 12px; }
  .nav-action-button { width: 34px; height: 34px; min-width: 34px; min-height: 34px; border-radius: 9px; }
  .nav-action-button svg, .menu-toggle .menu-icon { width: 16px; height: 16px; }
}
@media (max-width: 359px) {
  .nav-actions { grid-template-columns: repeat(3, 31px); gap: 1px; }
  .nav-action-button { width: 31px; height: 31px; min-width: 31px; min-height: 31px; }
}
@media (max-width: 640px) {
  .language-switcher { height: 34px; max-width: 105px; padding-left: 8px; font-size: 10px; }
  .menu-top-actions { gap: 6px; }
}
@media (max-width: 640px) { html:not(.pwa-install-available) .nav-actions { grid-template-columns: repeat(2, 34px); } }
@media (max-width: 359px) { html:not(.pwa-install-available) .nav-actions { grid-template-columns: repeat(2, 31px); } }
