/* =====================================================
   三光パートナーズ  スマホ表示 修正パッチ (全ページ対応版)
   使い方：
     <link rel="stylesheet" href="assets/styles.css">
     <link rel="stylesheet" href="assets/mobile-fix.css">   ← これを追加
     <script defer src="assets/mobile-nav.js"></script>     ← </body>直前
   ===================================================== */

/* --- 全体：横スクロール防止（最重要） --- */
html, body { overflow-x: hidden; max-width: 100%; }
img, iframe, video { max-width: 100%; height: auto; }

/* =====================================================
   ~ 900px  タブレット〜スマホ共通
   ===================================================== */
@media (max-width: 900px) {

  /* ---- Top bar ---- */
  .topbar { height: auto; padding: 6px 0; }
  .topbar-inner { flex-direction: column; gap: 2px; text-align: center; }
  .topbar-left { font-size: 11px; letter-spacing: 0.02em; }
  .topbar-right .tel { font-size: 14px; }

  /* ---- Header ---- */
  .header { height: 64px; }
  .header-inner { padding: 0 16px; gap: 8px; }
  .logo-mark { width: 36px; height: 36px; }
  .logo-mark::before { top: 10px; }
  .logo-mark span    { top: 17px; }
  .logo-mark::after  { bottom: 10px; }
  .logo-text .jp  { font-size: 15px; letter-spacing: 0.04em; }
  .logo-text .sub { font-size: 9px; letter-spacing: 0.15em; }

  .header-inner .btn {
    padding: 8px 14px;
    min-height: 36px;
    font-size: 12px;
    letter-spacing: 0.04em;
  }
  .header-inner .btn .arrow { display: none; }

  /* ---- Hero (トップ) ---- */
  .hero-inner { padding: 64px 20px 88px; }
  .hero-tag  { font-size: 10.5px; padding: 5px 10px; margin-bottom: 20px; }
  .hero h1   {
    font-size: 28px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    margin-bottom: 20px;
  }
  .hero-lead {
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 28px;
    letter-spacing: 0.02em;
  }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-side {
    position: static;
    justify-content: center;
    padding: 14px 20px 20px;
    background: rgba(0,0,0,0.15);
    font-size: 10px;
    letter-spacing: 0.2em;
  }

  /* ---- Hero Sub（下層ページの帯） ---- */
  .hero-sub .hero-inner { padding: 56px 20px 56px; }
  .hero-sub h1 {
    font-size: 22px !important;
    line-height: 1.55;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
  }
  .hero-sub .hero-lead { font-size: 13px; line-height: 1.85; }
  .hero-sub .hero-lead br { display: none; }

  /* ---- Breadcrumb ---- */
  .breadcrumb-inner { padding: 10px 16px; font-size: 11.5px; overflow-x: auto; white-space: nowrap; }

  /* ---- お知らせセクション：インラインの 220px 1fr を打ち消す ---- */
  section .section-inner[style*="grid-template-columns: 220px 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 0 20px !important;
  }
  .news-item {
    grid-template-columns: 90px auto !important;
    grid-template-areas:
      "date  cat"
      "title title" !important;
    gap: 8px 12px;
    padding: 16px 4px;
  }
  .news-item .date  { grid-area: date; font-size: 12px; }
  .news-item .cat   { grid-area: cat; justify-self: start; font-size: 10px; padding: 2px 8px; }
  .news-item .title { grid-area: title; font-size: 13.5px; line-height: 1.7; }
  .news-item .arr   { display: none; }

  /* ---- Section 余白 ---- */
  .section { padding: 60px 0; }
  .section-inner { padding: 0 20px; }
  .sec-head { margin-bottom: 36px; }
  .sec-head h2 { font-size: 24px; line-height: 1.5; letter-spacing: 0.04em; }
  .sec-head .en { font-size: 10.5px; letter-spacing: 0.25em; }
  .sec-head .desc { font-size: 13px; line-height: 1.85; }
  .sec-head .desc br { display: none; }
  .sec-head h2 br { display: none; } /* 意図的な改行は解除して自然に折り返す */

  .sec-head-bar { gap: 12px; padding-left: 12px; flex-wrap: wrap; }
  .sec-head-bar h2 { font-size: 20px; letter-spacing: 0.06em; }
  .sec-head-bar .en { font-size: 10.5px; }

  /* ---- About ---- */
  .about-block { grid-template-columns: 1fr !important; gap: 32px !important; }
  .about-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    min-height: 200px;
  }
  .about-photo::before { inset: -10px -10px 10px 10px; }
  .about-copy h2 { font-size: 22px; line-height: 1.6; letter-spacing: 0.06em; }
  .about-copy p  { font-size: 14px; line-height: 1.95; }

  /* ---- Service cards ---- */
  .service-grid { grid-template-columns: 1fr; gap: 20px; }
  .service-card .card-photo { height: 200px; }
  .service-card h3 { font-size: 20px; line-height: 1.55; }
  .service-card h3 br { display: none; }
  .service-card p  { font-size: 13.5px; }
  .service-card .card-body { padding: 24px 22px 26px; }

  /* ---- Reasons ---- */
  .reasons { grid-template-columns: 1fr; gap: 20px; }
  .reason { padding: 32px 26px 28px; }
  .reason .num { font-size: 36px; margin-bottom: 14px; }
  .reason h3 { font-size: 17px; }
  .reason h3 br { display: none; }

  /* ---- Numbers band ---- */
  .numbers-band { padding: 48px 0; }
  .numbers-head { margin-bottom: 28px; }
  .numbers-head h3 { font-size: 20px; letter-spacing: 0.06em; }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
  .num-cell {
    padding: 20px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }
  .num-cell:nth-child(2n) { border-right: none; }
  .num-cell .val { font-size: 40px; }
  .num-cell .cap { font-size: 11px; margin-bottom: 10px; }
  .num-cell .sub { font-size: 11px; }

  /* ---- Steps (5段階フロー：横並び→2列) ---- */
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
  .step { padding: 0 4px; }
  .step:not(:last-child)::after { display: none; }
  .step .dot { width: 48px; height: 48px; font-size: 17px; margin-bottom: 14px; }
  .step h4 { font-size: 14px; }
  .step h4 br { display: none; }
  .step p { font-size: 12px; }

  /* ---- Timeline (下層の縦フロー) ---- */
  .timeline { padding-left: 32px; }
  .timeline::before { left: 16px; }
  .timeline-item { padding: 0 0 32px 28px; }
  .timeline-item::before { left: -14px; width: 10px; height: 10px; }
  .timeline-item h4 { font-size: 16px; }
  .timeline-item p  { font-size: 13.5px; line-height: 1.85; }

  /* ---- Voice / Quote / Check / Plan グリッド ---- */
  .voice-grid, .quote-grid, .check-grid, .plan-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  /* インラインstyleで grid-template-columns を持つケースを潰す */
  [style*="grid-template-columns"] {
    /* この一般セレクタは危険なので、既知の親クラスに限って上書き */
  }
  .plan-grid[style],
  .chip-row[style] { grid-template-columns: 1fr !important; }
  .voice-card, .quote-card { padding: 26px 22px; }
  .voice-card h4 { font-size: 15.5px; }
  .voice-card p  { font-size: 13px; }
  .quote-card .qt { font-size: 14px; }
  .check-card { padding: 22px 20px; gap: 14px; }
  .check-card h4 { font-size: 15px; }
  .check-card p  { font-size: 13px; }
  .plan-card { padding: 32px 24px; }
  .plan-card h3 { font-size: 20px; }
  .plan-card .plan-scale { font-size: 26px; }

  /* ---- 2カラム info-box / two-col ---- */
  .two-col { grid-template-columns: 1fr !important; gap: 20px !important; }
  .info-box { padding: 26px 22px 24px; }
  .info-box h3 { font-size: 18px; }
  .info-box p  { font-size: 13.5px; }

  /* ---- Pricing table：セル縦積み ---- */
  .pricing-table th,
  .pricing-table td {
    display: block;
    width: 100% !important;
    padding: 14px 18px;
    font-size: 13.5px;
    border-bottom: none;
  }
  .pricing-table th {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line);
    font-size: 12.5px;
  }
  .pricing-table td { border-bottom: 1px solid var(--line); padding-top: 10px; }
  .pricing-table tr:last-child td { border-bottom: none; }
  .pricing-note { font-size: 12px; }

  /* ---- Domain table（consultation） ---- */
  .domain-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .domain-table table { min-width: 560px; }

  /* ---- FAQ ---- */
  .faq-item { padding: 20px 0; }
  .faq-q { gap: 12px; padding-right: 28px; }
  .faq-q .qmark, .faq-a .amark { font-size: 18px; min-width: 20px; }
  .faq-q .qtext { font-size: 14.5px; line-height: 1.6; }
  .faq-a { gap: 12px; padding-top: 12px; }
  .faq-a .atext { font-size: 13.5px; line-height: 1.9; }
  .faq-q::after { right: 0; width: 10px; height: 10px; top: 8px; }

  /* ---- CTA band ---- */
  .cta-band { padding: 56px 0; }
  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 0 20px;
  }
  .cta-inner h3 { font-size: 22px; letter-spacing: 0.06em; line-height: 1.55; }
  .cta-inner p  { font-size: 13px; }
  .cta-actions { flex-direction: column; width: 100%; gap: 10px; }
  .cta-actions .btn { width: 100%; }

  /* ---- Contact strip (電話・メール・LINE 3列 → 1列) ---- */
  .contact-strip { grid-template-columns: 1fr; }
  .contact-strip .col {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 24px 20px;
  }
  .contact-strip .col:last-child { border-bottom: none; }
  .contact-strip .col .big { font-size: 24px; }

  /* ---- Notice / Chip / Quote ---- */
  .notice-inner { flex-direction: column; gap: 8px; padding: 0 20px; }
  .notice-inner .label { align-self: flex-start; }
  .notice-inner .text { font-size: 12.5px; }

  /* ---- Form ---- */
  .form-block { padding: 28px 20px; }
  .form-row label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .form-row label .req,
  .form-row label .opt { margin-left: 0; vertical-align: baseline; }
  .form-row input,
  .form-row select,
  .form-row textarea { font-size: 16px; padding: 12px 14px; } /* iOSズーム防止：16px */

  /* ---- Footer ---- */
  .footer { padding: 48px 0 20px; }
  .footer-inner { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; padding-bottom: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: none; }
  .footer-col h5 { font-size: 14px; margin-bottom: 14px; }
  .footer-col ul li { font-size: 12.5px; margin-bottom: 8px; }
  .footer-legal { padding-top: 24px; }
  .footer-legal .compliance { padding: 14px 16px; font-size: 11.5px; line-height: 1.85; }
  .footer-copyright { justify-content: flex-start; gap: 12px; font-size: 11px; }

  /* ---- タップハイライト ---- */
  .btn, .nav-item, .news-item, .service-card {
    -webkit-tap-highlight-color: rgba(178,138,76,0.15);
  }
  a, button { touch-action: manipulation; }
}

.nav-item { white-space: nowrap; }
@media (max-width: 1280px) and (min-width: 901px) {
  .nav-item { padding: 8px 11px; font-size: 13px; }
}
@media (max-width: 900px) {
  a[href="akiya.html"][style*="grid-template-columns"] { grid-template-columns: 1fr !important; padding: 24px 22px !important; }
  a[href="akiya.html"][style*="grid-template-columns"] > div > div:nth-child(2) { font-size: 19px !important; }
  .nav-item { padding: 8px 12px; }
}

/* =====================================================
   ~ 480px  スマホ（iPhone SE〜標準サイズ）
   ===================================================== */
@media (max-width: 480px) {

  body { font-size: 14px; }

  .header-inner .btn {
    padding: 7px 10px;
    font-size: 11px;
    min-height: 32px;
  }

  /* Hero (トップ) */
  .hero-inner { padding: 48px 18px 72px; }
  .hero h1 {
    font-size: 22px;
    line-height: 1.55;
    letter-spacing: 0.02em;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
  .hero-lead { font-size: 13.5px; line-height: 1.85; }
  .hero-lead br { display: none; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { padding: 12px 20px; font-size: 12.5px; min-height: 44px; }

  /* Hero Sub */
  .hero-sub h1 { font-size: 20px !important; }
  .hero-sub .hero-lead { font-size: 12.5px; }

  /* Sec head */
  .sec-head h2 { font-size: 21px; letter-spacing: 0.02em; }
  .sec-head-bar h2 { font-size: 18px; }

  /* Numbers → 1列 */
  .numbers-grid { grid-template-columns: 1fr; gap: 0; }
  .num-cell {
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    padding: 22px 16px;
  }
  .num-cell:last-child { border-bottom: none; }
  .num-cell .val { font-size: 40px; }

  /* Steps → 1列 */
  .steps { grid-template-columns: 1fr; gap: 24px; }

  .service-card h3 { font-size: 18px; }
  .service-card .card-body { padding: 22px 20px; }

  .about-copy h2 { font-size: 20px; letter-spacing: 0.04em; }

  .news-item .date  { font-size: 11.5px; }
  .news-item .title { font-size: 13px; }

  .cta-inner h3 { font-size: 20px; }
  .cta-inner h3 br { display: none; }

  .contact-strip .col .big { font-size: 22px; }

  /* Footer → 1列 */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-brand { grid-column: auto; }
}
