/* ====================================================================
   Otona Match Navi — Mobile Responsive Layer (2026-04-22)
   Loaded LAST via functions-otona.php so it overrides all upstream CSS.
   Scope: <=980px (tablet) / <=768px (mobile) / <=480px (small) / <=375px
   ==================================================================== */

/* -------- Tablet compression -------- */
@media (max-width: 980px) {
  :root {
    --om-side-padding: 28px;
  }
  .om-hero-inner {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .om-hub-inner {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .om-feature-grid,
  .om-cat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 28px !important;
  }
  .om-rank-row {
    grid-template-columns: 64px 140px 1fr !important;
    gap: 20px !important;
  }
  .om-rank-row .om-cta {
    grid-column: 1 / -1;
    text-align: left !important;
  }
  .om-site-footer-inner {
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
  }
}

/* -------- Mobile breakpoint (phones + small tablets) -------- */
@media (max-width: 768px) {
  :root {
    --om-side-padding: 18px;
  }

  /* Kill horizontal overflow across the whole document */
  html,
  body,
  body.home,
  body.page,
  body.single {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
  img,
  iframe,
  video,
  table {
    max-width: 100% !important;
    height: auto;
  }

  /* ========== Site header ========== */
  .om-site-header .om-header-main {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 12px 18px !important;
  }
  .om-site-header .om-logo {
    font-size: 19px !important;
    white-space: nowrap !important;
    letter-spacing: -0.1px !important;
  }
  .om-site-header nav,
  .om-site-header .om-global-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px 16px !important;
    font-size: 10.5px !important;
    letter-spacing: 1.3px !important;
    width: 100% !important;
    row-gap: 6px !important;
  }
  .om-site-header nav a,
  .om-site-header .om-global-nav a {
    padding-bottom: 2px !important;
    white-space: nowrap !important;
  }
  .om-site-header .om-top-strip {
    font-size: 9px !important;
    letter-spacing: 1.4px !important;
    padding: 5px 10px !important;
  }

  /* ========== Hero ========== */
  .om-hero {
    padding: 40px 0 34px !important;
    /* Elegant mobile-safe gradient:
       - top-center soft bronze spotlight (candlelit editorial feel)
       - vertical fade: rich burgundy-brown at top → deep ink at bottom
       Avoids the strong diagonal + side radial splits that cluttered the old design on narrow screens. */
    background:
      radial-gradient(ellipse 65% 45% at 55% 5%, rgba(184, 147, 90, 0.13) 0%, transparent 65%),
      linear-gradient(180deg, #331725 0%, var(--om-dark-elev) 50%, var(--om-dark-base) 100%) !important;
  }
  .om-hero::before,
  .om-hero::after {
    display: none !important;
  }

  /* Dark feature bands (section 05 features, section 09 trust):
     cohesive with hero but simpler — pure vertical fade, no spotlight. */
  .om-dark {
    background: linear-gradient(180deg, var(--om-dark-elev) 0%, var(--om-dark-base) 100%) !important;
  }
  .om-dark::before,
  .om-dark::after {
    display: none !important;
  }
  .om-hero-inner {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    padding: 0 18px !important;
  }
  .om-hero-num {
    font-size: 48px !important;
    top: -8px !important;
    right: 0 !important;
  }
  .om-brand-strip {
    margin-bottom: 22px !important;
    gap: 12px !important;
  }
  .om-brand-strip .om-rule-sm {
    width: 38px !important;
  }
  .om-brand-strip .om-ey {
    font-size: 9px !important;
    letter-spacing: 1.6px !important;
  }
  .om-hero-h1 {
    font-size: 28px !important;
    line-height: 1.22 !important;
    letter-spacing: -0.1px !important;
    max-width: 100% !important;
    word-break: normal !important;
    margin: 0 0 16px !important;
  }
  .om-hero-h1 em {
    white-space: normal !important;
  }
  .om-hero-deck {
    font-size: 14.5px !important;
    line-height: 1.75 !important;
    max-width: 100% !important;
    margin: 0 0 22px !important;
  }
  .om-cta-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-bottom: 26px !important;
  }
  .om-hero .om-btn-gold,
  .om-hero .om-btn-ghost-gold {
    width: 100% !important;
    text-align: center !important;
    padding: 15px 20px !important;
    font-size: 11px !important;
    letter-spacing: 2px !important;
  }
  .om-stats {
    gap: 14px !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    padding-top: 16px !important;
  }
  .om-stats .om-stat {
    flex: 1 1 28% !important;
    min-width: 0 !important;
  }
  .om-stat-n {
    font-size: 22px !important;
  }
  .om-stat-l {
    font-size: 9px !important;
    letter-spacing: 1.2px !important;
    margin-top: 2px !important;
  }

  /* ========== Wizard teaser (ex-right column) ========== */
  .om-wizard-teaser {
    padding: 26px 20px !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .om-wizard-teaser .om-ey {
    font-size: 9px !important;
    letter-spacing: 1.6px !important;
  }
  .om-wizard-title {
    font-size: 21px !important;
    line-height: 1.32 !important;
    margin: 0 0 14px !important;
  }
  .om-wizard-teaser p {
    font-size: 13px !important;
    line-height: 1.7 !important;
    margin: 0 0 20px !important;
  }
  .om-wizard-steps {
    font-size: 10px !important;
    letter-spacing: 1.2px !important;
    gap: 6px !important;
    justify-content: space-around !important;
    margin-bottom: 20px !important;
  }
  .om-wizard-steps span::before {
    width: 14px !important;
    height: 14px !important;
  }
  .om-wizard-cta {
    padding: 14px 0 !important;
    font-size: 10.5px !important;
    letter-spacing: 2px !important;
  }

  /* ========== Generic sections ========== */
  .om-section {
    padding: 42px 0 !important;
  }
  .om-section-inner {
    padding: 0 18px !important;
  }
  .om-section-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding-bottom: 12px !important;
    margin-bottom: 26px !important;
  }
  .om-section-head .om-head-left {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }
  .om-section-head .om-sec-num {
    font-size: 15px !important;
  }
  .om-section-head .om-sec-ey {
    font-size: 9px !important;
    letter-spacing: 1.4px !important;
  }
  .om-section-head h2 {
    font-size: 23px !important;
    letter-spacing: -0.1px !important;
    line-height: 1.25 !important;
  }

  /* ========== Ranking (Section 02) ========== */
  .om-rank-row {
    display: grid !important;
    grid-template-columns: 52px 1fr !important;
    grid-template-areas:
      "num thumb"
      "info info"
      "cta cta" !important;
    gap: 12px 14px !important;
    padding: 22px 0 !important;
    align-items: center !important;
  }
  .om-rank-row .om-rank-num {
    grid-area: num !important;
    font-size: 40px !important;
  }
  .om-rank-row .om-thumb {
    grid-area: thumb !important;
    max-width: 100% !important;
  }
  .om-rank-row .om-info {
    grid-area: info !important;
  }
  .om-rank-row .om-info h3 {
    font-size: 19px !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
  }
  .om-rank-row .om-info .om-desc {
    font-size: 13px !important;
    max-width: 100% !important;
    line-height: 1.75 !important;
  }
  .om-rank-row .om-cta {
    grid-area: cta !important;
    text-align: left !important;
  }
  .om-rank-row .om-cta .om-btn-primary {
    padding: 12px 20px !important;
    font-size: 10px !important;
    letter-spacing: 1.6px !important;
    display: inline-block !important;
  }

  /* ========== Category grid (Section 04) ========== */
  .om-cat-grid {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
  .om-cat-item h3 {
    font-size: 19px !important;
    padding-bottom: 8px !important;
  }
  .om-cat-item p {
    font-size: 13px !important;
    line-height: 1.75 !important;
  }

  /* ========== Feature grid (Section 05 DARK) ========== */
  .om-dark {
    padding: 48px 0 !important;
  }
  .om-dark-inner {
    padding: 0 18px !important;
  }
  .om-feature-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding-bottom: 14px !important;
    margin-bottom: 28px !important;
  }
  .om-feature-head h2 {
    font-size: 24px !important;
    line-height: 1.25 !important;
  }
  .om-feature-head .om-nav-dots {
    font-size: 9px !important;
    letter-spacing: 1.4px !important;
  }
  .om-feature-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .om-feature-card h3 {
    font-size: 19px !important;
  }
  .om-feature-card p {
    font-size: 13px !important;
    line-height: 1.75 !important;
  }

  /* ========== Marriage hub (Section 06) ========== */
  .om-hub {
    padding: 48px 0 !important;
  }
  .om-hub-inner {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    padding: 0 18px !important;
  }
  .om-hub h2 {
    font-size: 26px !important;
    line-height: 1.25 !important;
  }
  .om-hub p {
    font-size: 14px !important;
    line-height: 1.8 !important;
  }
  .om-hub-stat .om-n {
    font-size: 36px !important;
  }
  .om-hub-stat .om-n span {
    font-size: 18px !important;
  }
  .om-hub-stat .om-l {
    font-size: 10px !important;
  }
  .om-hub .om-right .om-row {
    grid-template-columns: 36px 1fr auto !important;
    gap: 12px !important;
    padding: 16px 0 !important;
  }
  .om-hub .om-right .om-row .om-n {
    font-size: 22px !important;
  }
  .om-hub .om-right .om-row h4 {
    font-size: 15px !important;
  }
  .om-hub .om-right .om-row .om-meta {
    font-size: 11px !important;
  }
  .om-hub .om-right .om-row .om-price {
    font-size: 14px !important;
  }
  .om-hub-editorial {
    padding: 24px 20px !important;
  }
  .om-hub-editorial__title {
    font-size: 19px !important;
    margin-bottom: 16px !important;
  }
  .om-hub-editorial__list li {
    grid-template-columns: 32px 1fr !important;
    gap: 12px !important;
    padding: 12px 0 !important;
  }
  .om-hub-editorial__n {
    font-size: 18px !important;
  }
  .om-hub-editorial__list li div strong {
    font-size: 14px !important;
  }
  .om-hub-editorial__list li div span {
    font-size: 12px !important;
    line-height: 1.6 !important;
  }

  /* ========== Section 09 Trust Pillars (inline-styled 3-col grid) ========== */
  .om-trust-grid {
    grid-template-columns: 1fr !important;
    gap: 26px !important;
  }
  .om-trust-pillar h3 {
    font-size: 20px !important;
    margin: 6px 0 8px !important;
  }
  .om-trust-pillar p {
    font-size: 13.5px !important;
    line-height: 1.8 !important;
  }
  .om-trust-pillar .om-ey {
    font-size: 10px !important;
    letter-spacing: 1.6px !important;
  }

  /* ========== Comparison table (Section 07) ========== */
  .om-edt-table {
    font-size: 12px !important;
    min-width: 560px; /* preserve layout inside scrollable container */
  }
  .om-edt-table th,
  .om-edt-table td {
    padding: 10px 8px !important;
  }
  .om-edt-table .om-btn-gold {
    padding: 10px 14px !important;
    font-size: 10px !important;
    letter-spacing: 1.6px !important;
    white-space: nowrap !important;
  }

  /* ========== Closer CTA ========== */
  .om-closer {
    padding: 40px 18px !important;
  }
  .om-closer-h3 {
    font-size: 26px !important;
    line-height: 1.25 !important;
  }

  /* ========== Footer ========== */
  .om-site-footer {
    padding: 44px 20px 24px !important;
  }
  .om-site-footer-inner {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    padding-bottom: 24px !important;
  }
  .om-site-footer .om-brand {
    font-size: 22px !important;
  }
  .om-site-footer .om-tag,
  .om-site-footer .om-footer-tagline {
    max-width: 100% !important;
    font-size: 13px !important;
    line-height: 1.75 !important;
  }
  .om-site-footer .om-col-label {
    font-size: 10px !important;
    letter-spacing: 2px !important;
    margin-bottom: 12px !important;
  }
  .om-site-footer ul {
    font-size: 13px !important;
    line-height: 2 !important;
  }
  .om-site-footer .om-footer-bottom {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: flex-start !important;
    font-size: 9.5px !important;
    letter-spacing: 1.2px !important;
  }

  /* ========== Single article fallback ========== */
  .om-article-body-wrap {
    grid-template-columns: 1fr !important;
    padding: 40px 18px 60px !important;
    gap: 40px !important;
  }
  .om-article-head {
    padding: 24px 18px 24px !important;
  }
  .om-article-head .om-article-h1 {
    font-size: 30px !important;
    line-height: 1.2 !important;
  }
  .om-article-head .om-deck {
    font-size: 15.5px !important;
    max-width: 100% !important;
  }
  .om-article-head .om-byline {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .om-article-main h2 {
    font-size: 22px !important;
    margin: 44px 0 12px !important;
  }
  .om-article-main p {
    font-size: 15.5px !important;
    line-height: 1.85 !important;
  }
  .om-breadcrumb {
    padding: 14px 18px 0 !important;
    font-size: 9px !important;
  }
}

/* -------- Small phones -------- */
@media (max-width: 480px) {
  .om-hero-h1 {
    font-size: 25px !important;
  }
  .om-hero-num {
    font-size: 40px !important;
  }
  .om-section-head h2 {
    font-size: 21px !important;
  }
  .om-feature-head h2 {
    font-size: 22px !important;
  }
  .om-hub h2 {
    font-size: 24px !important;
  }
  .om-rank-row .om-rank-num {
    font-size: 36px !important;
  }
  .om-rank-row .om-info h3 {
    font-size: 17px !important;
  }
  .om-wizard-title {
    font-size: 19px !important;
  }
  .om-closer-h3 {
    font-size: 23px !important;
  }
  .om-site-header .om-logo {
    font-size: 17.5px !important;
  }
  .om-site-header nav,
  .om-site-header .om-global-nav {
    font-size: 10px !important;
    gap: 8px 14px !important;
  }
}

/* -------- iPhone SE / tightest phones -------- */
@media (max-width: 375px) {
  :root {
    --om-side-padding: 16px;
  }
  .om-hero-h1 {
    font-size: 22.5px !important;
    line-height: 1.25 !important;
  }
  .om-hero-deck {
    font-size: 13.5px !important;
  }
  .om-stats {
    gap: 10px !important;
  }
  .om-stat-n {
    font-size: 19px !important;
  }
  .om-stat-l {
    font-size: 8.5px !important;
  }
  .om-section-head h2 {
    font-size: 19.5px !important;
  }
  .om-feature-head h2 {
    font-size: 20px !important;
  }
  .om-wizard-title {
    font-size: 18px !important;
  }
  .om-hub h2 {
    font-size: 22px !important;
  }
  .om-hub .om-right .om-row {
    grid-template-columns: 28px 1fr auto !important;
    gap: 10px !important;
  }
  .om-hub .om-right .om-row .om-price {
    font-size: 12.5px !important;
  }
  .om-site-header .om-header-main {
    padding: 10px 14px !important;
  }
  .om-section-inner,
  .om-hero-inner,
  .om-hub-inner,
  .om-dark-inner {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}
