/* ============================================
   sp.css — B.B-Link's スマホ専用スタイル
   対象: max-width 480px
   index.html側の901px以上(PC版)には絶対に影響しない
   ※ index.html内の ≤900px ルールの上に重ねる調整層
   ============================================ */

@media (max-width: 480px) {

  /* ----------------------------------------
     全体リズム
  ---------------------------------------- */
  .wrap { padding: 0 20px; }
  .sec-pad, .service, .contact { padding: 72px 0; }
  .sec-en { font-size: 13px; letter-spacing: .14em; margin-bottom: 12px; }
  .sec-jp { font-size: clamp(21px, 5.6vw, 24px); line-height: 1.6; }
  .sec-head { margin-bottom: 44px; }

  /* ----------------------------------------
     HEADER / MENU
  ---------------------------------------- */
  header { padding: 18px 0; }
  header.scrolled { padding: 10px 0; }
  .logo .logo-img { height: 34px; }
  .menu-toggle { width: 48px; height: 48px; flex: 0 0 48px; gap: 5px; }
  /* iOSのアドレスバーで下が隠れないようdvh */
  .menu-panel { height: 100dvh; padding: 100px 36px 44px; }
  .menu-panel ul { gap: 18px; }
  .menu-panel a { font-size: 24px; }

  /* ----------------------------------------
     HERO
  ---------------------------------------- */

  /* 100vhだとiOSでh1がアドレスバーに隠れるためsvh
     (非対応ブラウザはbaseの100vhにフォールバック) */
  .hero { height: 100svh; min-height: 560px; }

  /* h1: spanで確実に2行に */
  .hero h1 {
    font-size: clamp(28px, 7.5vw, 38px);
    line-height: 1.45;
    letter-spacing: .02em;
    white-space: normal;
  }
  .hero h1 .h1-l1,
  .hero h1 .h1-l2 {
    display: block;
    white-space: nowrap;
  }
  /* SP版では「、」不要のためそのまま */
  .hero h1 .h1-l1::after { content: none; }

  /* サブコピー: 1行に収まるサイズに（極小端末でも11pxを下限に） */
  .hero .sub {
    font-size: clamp(11px, 3vw, 15px);
    letter-spacing: .03em;
    line-height: 1.85;
    margin-top: 16px;
    white-space: nowrap;
  }

  /* テキストエリアの余白（ホームバー分の安全域を確保） */
  .hero-foot {
    padding-bottom: max(10vh, calc(56px + env(safe-area-inset-bottom)));
    padding-left: 20px;
    padding-right: 20px;
  }

  /* スライド画像: 明度を上げて被写体を見えやすく */
  .hero-slide {
    filter: saturate(.88) contrast(1.06) brightness(.88);
  }

  /* 写真の表示位置: 人物の顔〜上半身が中央に来るよう調整 */
  .hero-slide--s1 { object-position: 30% 20%; }    /* Hero_4: 店主・左寄り上 */
  .hero-slide--s2 { object-position: center 15%; } /* Hero_2: 板前・上寄り */
  .hero-slide--s3 { object-position: 40% center; } /* Hero_1: 暖簾の人・中央寄り */
  .hero-slide--s4 { object-position: center center; } /* Hero_3: 店内 */

  /* ----------------------------------------
     PROBLEM
  ---------------------------------------- */
  .problem-sticky { padding: 72px 0; }
  .problem-head { margin-bottom: 32px; }
  .problem-track { padding: 0 20px !important; gap: 18px; }
  .problem-photo { grid-column: 1 !important; width: 100% !important; height: 210px; }
  .problem-panel:nth-child(1) .problem-photo { background-image: url("assets/Problem_saiyou.jpg") !important; }
  .problem-panel:nth-child(2) .problem-photo { background-image: url("assets/Problem_teichaku.jpg") !important; }
  .problem-panel:nth-child(3) .problem-photo { background-image: url("assets/Problem_shukyaku.jpg") !important; }
  .problem-copy { padding: 30px 20px 36px; }
  .problem-copy h3 { margin-bottom: 20px; }
  .problem-copy p { font-size: 13.5px; line-height: 2.05; }
  .prob-label {
    width: auto;
    min-width: 150px;
    min-height: 36px;
    font-size: 13px;
    margin-bottom: 22px;
  }

  /* ----------------------------------------
     ASK
  ---------------------------------------- */
  .ask-txt { padding: 64px 0 56px; }
  .ask .eyebrow { font-size: 12.5px; margin-bottom: 22px; }
  .ask h2 { font-size: clamp(25px, 7vw, 30px); line-height: 1.62; margin-bottom: 26px; }
  .ask p { font-size: 13.5px; line-height: 2.1; max-width: none; }
  /* 狭い画面では強制改行を解除して自然に折り返す */
  .ask p br { display: none; }
  /* 縦積みレイアウトでは写真を上方向フェードに切り替え */
  .ask .ph {
    min-height: 300px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.5) 9%, #000 20%);
            mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.5) 9%, #000 20%);
  }

  /* ----------------------------------------
     PHILOSOPHY
  ---------------------------------------- */
  .philosophy { padding: 96px 0; }
  .philosophy::after { font-size: 74px; }
  .philosophy .ln { margin-bottom: 28px; }
  .philosophy .label { margin-bottom: 24px; }
  .philosophy p {
    margin-top: 28px;
    text-align: left;
    line-height: 2.15;
  }
  .philosophy p br { display: none; }

  /* ----------------------------------------
     SERVICE
  ---------------------------------------- */
  .service { background-size: cover; padding: 64px 0 88px; }
  .serv-top { margin-bottom: 36px; gap: 12px; }
  .serv-sub { padding-left: 2px; }
  .serv-sub .jp { font-size: 20px; }
  .serv-block { grid-template-columns: 48px minmax(0, 1fr); padding: 44px 0; }
  .serv-block:first-child { padding: 44px 0; }
  .serv-num { width: 48px; padding: 2px 0 0 14px; }
  .serv-num::before { left: 4px; }
  .serv-label { left: 26px; font-size: 10px; letter-spacing: .18em; }
  .serv-num-tag { font-size: 26px; }
  .serv-vtag { font-size: clamp(17px, 4.6vw, 20px); margin-bottom: 12px; }
  .serv-rule { width: 140px; }
  .serv-head { margin-bottom: 20px; }
  .serv-body { row-gap: 20px; }
  .serv-photo { height: 190px; }
  .serv-bubble h3 { font-size: 19px; line-height: 1.6; margin-bottom: 16px; }
  .serv-bubble p { font-size: 13.5px; line-height: 2.05; }
  .serv-action { margin-top: 22px; font-size: 12.5px; gap: 12px; }
  .serv-action .round-ar { width: 40px; height: 40px; }

  /* ----------------------------------------
     WHY (stats + rows + closing)
  ---------------------------------------- */
  .why-stats { padding: 60px 0 70px; }
  .why-stats > .wrap:first-of-type { margin-bottom: 36px !important; }
  .why-stats .sec-jp { font-size: 20px; }
  .stat-item { padding: 28px 20px; }
  .stat-item:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,.10); }
  .stat-item::before { font-size: clamp(92px, 28vw, 116px); }
  .stat-label { margin-bottom: 16px; font-size: 11.5px; }
  .stat-value { font-size: 52px; }

  .why-row .ph { height: 230px; }
  .why-row .txt { padding: 38px 20px 48px; }
  .why-num { font-size: 64px; top: 10px; }
  .why-row h3 { font-size: clamp(22px, 6vw, 26px); margin-bottom: 16px; }
  .why-row p { font-size: 13.5px; line-height: 2.05; }
  .why-wm { font-size: 56px; bottom: 4%; }
  .why-link { margin-top: 24px; font-size: 12.5px; gap: 12px; }
  .why-link .round-ar { width: 40px; height: 40px; }

  .why-closing { padding: 76px 20px 96px; }
  .why-closing p,
  .why-closing > span { font-size: clamp(18px, 5vw, 22px); line-height: 2; }
  .why-closing > span { margin-top: 12px; }

  /* ----------------------------------------
     ABOUT
  ---------------------------------------- */
  .about { padding: 64px 0 96px; }
  .about-big { font-size: 48px; margin-bottom: 28px; }
  .about-col { padding: 32px 20px; }
  .about-col .en { font-size: 12.5px; margin-bottom: 10px; }
  .about-col h3 { font-size: 21px; }

  /* ----------------------------------------
     RECRUIT
     PC用 min-height:1370px のままだと空白が巨大化するため再設計
  ---------------------------------------- */
  .recruit { min-height: 640px; padding-top: 72px; }
  .recruit::after { height: 480px; }
  .recruit .inner { gap: 26px; }
  .recruit .copy { margin-top: 16px; font-size: 13px; letter-spacing: .08em; }
  .entry { width: 132px; height: 132px; }
  .entry small { font-size: 11px; }

  /* ----------------------------------------
     CONTACT
  ---------------------------------------- */
  .contact { padding: 80px 0 104px; }
  .contact h2 { font-size: clamp(40px, 12vw, 52px); margin-bottom: 16px; }
  .contact .sub { font-size: 13px; letter-spacing: .08em; margin-bottom: 32px; }
  .contact-box { padding: 32px 18px; }
  .contact-box .tel { font-size: 30px; }
  .contact-box .hours { font-size: 11.5px; }
  .cta-btns { margin-top: 28px; gap: 12px; }
  .btn { padding: 15px 24px; font-size: 13.5px; letter-spacing: .1em; }

  /* ----------------------------------------
     FOOTER
  ---------------------------------------- */
  footer { padding: 60px 0 26px; }
  .footer-logo { margin-bottom: 18px; }
  .footer-logo .logo-img { width: 118px; }
  .foot-tag { font-size: 16.5px; letter-spacing: .07em; }
  .foot-addr { font-size: 11.5px; margin-bottom: 30px; }
  .foot-nav { gap: 14px 22px; padding-bottom: 26px; }
  .foot-bottom { padding-top: 22px; font-size: 10.5px; gap: 16px; }

}

@media (max-width: 900px) {
  .sp-break {
    display: block;
  }

  .problem-sticky {
    padding-top: 24px !important;
  }

  .problem-head {
    margin-top: 0 !important;
    margin-bottom: 26px !important;
  }

  .problem-track > .problem-panel > .problem-photo {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0;
  }

  .problem-track > .problem-panel:nth-of-type(1) .problem-photo {
    background-image: url("assets/Problem_saiyou.jpg") !important;
  }

  .problem-track > .problem-panel:nth-of-type(2) .problem-photo {
    background-image: url("assets/Problem_teichaku.jpg") !important;
  }

  .problem-track > .problem-panel:nth-of-type(3) .problem-photo {
    background-image: url("assets/Problem_shukyaku.jpg") !important;
  }

  .problem-track > .problem-panel:nth-of-type(3) .problem-copy h3 {
    white-space: nowrap;
    font-size: clamp(16px, 4.4vw, 20px);
    letter-spacing: 0;
  }

  .problem-track > .problem-panel:nth-of-type(3) .problem-copy h3 br {
    display: none;
  }

  .philosophy p {
    text-align: center !important;
  }

  .philosophy h2 {
    font-size: clamp(20px, 6.55vw, 26px) !important;
    line-height: 1.55;
    letter-spacing: 0;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
  }

  .philosophy .sp-nowrap-line {
    display: block;
    white-space: nowrap;
    font-size: clamp(11.2px, 3.35vw, 13.5px);
    letter-spacing: .01em;
  }

  .serv-vtag {
    display: flex;
    align-items: baseline;
    gap: .28em;
  }

  .serv-num-tag {
    font-size: 1em !important;
    line-height: inherit;
    margin-right: 0;
  }

  .serv-photo,
  .serv-block.in .serv-photo {
    clip-path: none !important;
  }

  .why-stats .sec-jp {
    font-size: clamp(25px, 7vw, 30px) !important;
    line-height: 1.7;
    letter-spacing: .03em;
  }

  .why-stats .sec-jp .sp-break {
    white-space: nowrap;
  }

  .why-photo,
  .why-row.is-reverse .why-photo {
    clip-path: none !important;
  }

  .why-row .why-num,
  .why-row.is-reverse .why-num {
    top: 6px !important;
    left: 0 !important;
    right: auto !important;
    color: rgba(27,42,74,.035) !important;
  }

  .why-row .why-wm,
  .why-row.is-reverse .why-wm {
    left: auto !important;
    right: 4% !important;
    bottom: 4% !important;
    text-align: right;
  }

  .why-closing p,
  .why-closing > span {
    line-height: 1.85;
  }

  .why-closing > span {
    margin-top: 22px !important;
  }

  .footer-logo .logo-img {
    width: 108px !important;
  }

  .foot-addr {
    line-height: 1.72 !important;
    margin-bottom: 24px !important;
  }

  .foot-addr br {
    display: none;
  }

  .foot-addr .foot-line {
    display: block;
  }

  .foot-nav {
    gap: 8px 18px !important;
    padding-bottom: 22px !important;
    line-height: 1.3;
  }

  .foot-nav-break {
    display: block !important;
    flex-basis: 100%;
    width: 100%;
    height: 0;
  }

  .foot-bottom {
    padding-top: 20px !important;
  }
}
