@charset "utf-8";

/* ============================================================
   のざき薬局 — スマホ・タブレット対応

   旧サイトは UA を見てスマホ専用の HTML を返していた（/css/sphone/）。
   静的サイトでそれを再現すると HTML を 2 系統持つことになり、
   月1回の文章修正が毎回 2 倍になるため、
   **PC 版の HTML 1 つをレスポンシブにする**方針を採る。

   下部の固定ボタンとヘッダーのアイコンは、旧スマホ版の画像
   （/images/sphone/）をそのまま流用しているので見た目は揃う。

   PC 版レイアウトは 980px 固定・絶対配置が多いので、
   ここで幅を流動化し、絶対配置を通常フローに戻している。
   ============================================================ */

/* 画面幅にかかわらず必要なもの ------------------------------ */

.fixed-footer,
.sp-menu-btn,
.sp-tel-btn,
.sp-menu-bg,
.sp-menu-panel,
#sp-mainimage { display: none; }
.sp-menu-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }

@media screen and (max-width: 900px) {

  html { -webkit-text-size-adjust: 100%; }

  body {
    /* PC 版は body に min-width:980px が掛かっていて、
       これを外さない限りスマホでも 980px のまま横スクロールになる */
    min-width: 0;
    font-size: 16px;
    line-height: 1.9;
    /* 下部固定ボタンの分だけ、本文が隠れないよう空ける */
    padding-bottom: calc(52px + env(safe-area-inset-bottom));
  }

  img { max-width: 100%; height: auto; }

  /* 980px 固定をやめて画面幅に合わせる -------------------- */
  #header-inner,
  #content-inner,
  .home #content-inner,
  #footer-inner,
  .main-message,
  .main-message-inner,
  .mainbn-inner,
  .mainbn-body,
  .main-mail,
  .main-banner {
    width: auto;
    max-width: 100%;
  }

  #header-inner { height: auto; padding: 18px 16px 14px; }
  #content-inner { padding: 0 0 40px; }

  /* 2カラムをやめて縦に積む ------------------------------- */
  #main, #sidebar {
    float: none;
    width: auto;
  }
  /* #main に左右の余白を付けると、悩みの帯まで白く縁取られてしまう。
     余白は中の文章ブロックだけに付ける */
  #sidebar { padding: 0 16px; }
  .entry { padding-left: 16px; padding-right: 16px; }

  /* ヘッダー -------------------------------------------
     旧サイトはスマホ用に別テンプレートを返していた（/css/sphone/）。
     ヘッダーは「黄色いバー + 右に正方形ボタン」で、トップだけ専用の
     ヒーロー画像を持つ。PC の背景イラストを切り抜いて代用すると
     キャラクターが見切れるので、旧スマホ版の素材と寸法をそのまま使う。
     寸法の 15.8vw / 17.5vw は旧 sphone CSS の値。 */
  body,
  body.home {
    /* body.home の背景は色を含まない一括指定なので、
       画像を外すと背景色が透明になる。白を明示する */
    background-image: none;
    background-color: #fff;
  }

  #header {
    margin: 0;
    padding: 0;
    background: #FEE383;
    background-image: none;
  }
  #header-inner,
  .home #header-inner {
    position: relative;
    width: 100%;
    height: 15.8vw;
    padding: 0;
  }

  /* ロゴは <picture> で旧スマホ版のもの（茶色の角と赤い枠込み）に切替わる。
     バーより少し背が高く、下にはみ出すのが元のデザイン */
  .header-logo,
  .home .header-logo {
    position: absolute;
    top: 0;
    left: 0;
    height: 17.5vw;
    max-width: none;
    margin: 0;
  }
  .header-logo img { height: 17.5vw; width: auto; }

  /* 下層ページの電話番号画像はバーのボタンに置き換わるので出さない */
  .header-tel { display: none; }

  /* 店舗紹介・アクセスはメニューに入れるので出さない */
  .gnav { display: none; }

  /* トップだけに入るスマホ専用ヒーロー */
  #sp-mainimage { display: block; line-height: 0; background: #FEE383; }
  #sp-mainimage img { display: block; width: 100%; height: auto; }

  /* 右上のボタン 2 つ（電話 / MENU）------------------------
     メールは使わないので、旧スマホ版の 3 つから 2 つに減らす */
  .sp-tel-btn {
    display: block;
    position: absolute;
    top: 0;
    right: 15.8vw;
    width: 15.8vw;
    height: 15.8vw;
    background: url(/images/sphone/header-tel.png) no-repeat center;
    background-size: 100% 100%;
    z-index: 60;
  }
  .sp-menu-btn {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 15.8vw;
    height: 15.8vw;
    border-radius: 0;
    background: url(/images/sphone/header-btn-bg.png) no-repeat center;
    background-size: 100% 100%;
    cursor: pointer;
    z-index: 60;
  }
  .sp-menu-btn span {
    display: block;
    position: absolute;
    left: 50%;
    width: 7.7vw;
    margin-left: -3.85vw;
    height: 0.7vw;
    min-height: 2px;
    background: #fff;
    transition: transform .2s, opacity .2s;
  }
  .sp-menu-btn span:nth-child(1) { top: 3.6vw; }
  .sp-menu-btn span:nth-child(2) { top: 5.6vw; }
  .sp-menu-btn span:nth-child(3) { top: 7.6vw; }
  /* MENU の文字は header-btn-bg.png に元から入っているので重ねない */
  .sp-menu-toggle:focus-visible + .sp-menu-btn { outline: 3px solid #fff; }
  .sp-menu-toggle:checked + .sp-menu-btn span:nth-child(1) { transform: translateY(2vw) rotate(45deg); }
  .sp-menu-toggle:checked + .sp-menu-btn span:nth-child(2) { opacity: 0; }
  .sp-menu-toggle:checked + .sp-menu-btn span:nth-child(3) { transform: translateY(-2vw) rotate(-45deg); }

  /* 開いたときに後ろを覆う。ここを押しても閉じる */
  .sp-menu-bg {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s;
    z-index: 55;
  }
  .sp-menu-toggle:checked ~ .sp-menu-bg { opacity: 1; visibility: visible; }

  .sp-menu-panel {
    display: block;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 74%;
    max-width: 300px;
    padding: 20vw 0 24px;
    background: #fff;
    box-shadow: -3px 0 14px rgba(0,0,0,.25);
    transform: translateX(100%);
    transition: transform .25s ease;
    overflow-y: auto;
    z-index: 58;
  }
  .sp-menu-toggle:checked ~ .sp-menu-panel { transform: translateX(0); }
  .sp-menu-panel ul { margin: 0; padding: 0; list-style: none; }
  .sp-menu-panel li { list-style: none; border-bottom: 1px solid #ece3d2; }
  .sp-menu-panel a {
    display: block;
    padding: 16px 20px;
    font-size: 16px;
    line-height: 1.5;
    color: #584138;
    text-decoration: none;
    text-align: left;
  }

  /* 見出しが上の茶色い帯に重ならないよう、しっかり下げる --- */
  .main-message { margin-top: 18px; }
  .main-message h2 { margin: 0 0 22px; }
  /* 見出しは <picture> で旧スマホ版の 2 行画像に差し替わる */
  .main-message h2 img { max-width: 94%; margin: 0 auto; }

  /* 本文の背景に敷かれている店舗写真を、文字の上に出す ---- */
  .main-message-body {
    min-height: 0;
    /* 元は左 336px を空けて、そこに背景の店舗写真を置いていた。
       スマホでは写真を上に出し、その分だけ上を空ける */
    padding: 290px 16px 0;
    font-size: 16px;
    line-height: 2.05em;
    background-position: center 0 !important;
    background-size: 240px auto !important;
  }
  /* 右下のキャラクター。本文に重なるのでスマホでは出さない */
  .main-message-body:after { display: none; }

  /* 悩みバナー: 背景の黄色を画面幅いっぱいに。
     上下のカーブ画像も幅に合わせて全部見せる */
  .mainbn {
    margin-bottom: 0;
    padding-top: 9.33%;       /* 112 / 1920 * 1.6 */
    background-size: 160% auto;
  }
  .mainbn-inner {
    padding-bottom: 5.67%;    /* 68 / 1920 * 1.6 */
    background-size: 160% auto;
  }
  .mainbn h2 { margin: 6px 0 20px; }
  .mainbn h2 img { max-width: 80%; }
  .mainbn-body { padding: 0 14px 10px; }
  /* 元は 4 列に並べるため ul に負マージン・li に固定幅が掛かっている */
  .mainbn ul { margin: 0; }
  .mainbn li { float: none; width: 46%; margin: 0; }
  .mainbn-body ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .mainbn-body li { float: none; width: 46%; margin: 0; }
  .mainbn-body li img { width: 100%; }

  /* 処方せん送信バナー ----------------------------------- */
  .main-mail { padding: 0 16px; }

  /* 本文 ------------------------------------------------- */
  .entry-content,
  .entry-content p,
  #main p, #main li, #main td, #main th, #main dd {
    font-size: 16px;
    line-height: 1.95;
  }
  #main h2 { font-size: 20px; line-height: 1.5; }
  #main h3 { font-size: 18px; line-height: 1.5; }
  #main table { width: 100%; }

  /* 下層ページの見出し周り ------------------------------- */
  /* ヘッダーと見出しの間にある空の装飾要素。
     旧スマホ版には無く、20px の隙間を作って黄色が途切れるので出さない */
  .page-title-wrap,
  .page-title-wrap2 { display: none; }

  /* 下層の h1（例「店舗紹介」）は PC では見えないまま場所だけ
     取っている。スマホでは見出しとして出したほうが分かりやすい */
  /* 下層のページ見出し。旧スマホ版は全幅の黄色ブロックで、
     ヘッダーの黄色とつながって見えるのが元のデザイン
     （padding / background-color は旧 sphone CSS の値） */
  h1.page-title {
    margin: 0 0 0.8rem;
    padding: 2.2rem 0.75rem;
    background-color: #FEE383;
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.3;
    font-weight: bold;
    color: #584138;
    text-indent: 0;
  }

  /* 旧スマホ版にパンくずは無い。
     このサイトは JS が要素に style="display:block" を直接付けるので、
     !important でないと効かない（PC では残すので HTML からは消さない） */
  .breadcrumb-wrap { display: none !important; }

  /* サイドナビ ------------------------------------------- */
  #sidebar { margin-top: 30px; }
  .side-nav-inner li { font-size: 16px; }

  /* フッター: 絶対配置を解いて縦に積む ------------------- */
  #footer-inner { padding: 64px 16px 0; text-align: center; }

  /* 右カラムに入るはずだったメール・SNS・地図はすべて削除済みなので、
     2 カラムにすると電話番号が左半分に取り残される。1 カラムにする */
  .info-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
  }

  .footer-logo { grid-column: 1 / -1; margin: 0 auto 10px; max-width: 200px; }
  .footer-logo img { width: 100%; }

  .footer-tel,
  .footer-mail,
  .footer-addr,
  .footer-sns,
  .footer-img,
  .footer-gmap {
    position: static;
    top: auto; left: auto; right: auto;
  }
  .footer-tel { margin: 0 auto 8px; max-width: 260px; }
  .footer-tel img { width: 100%; }
  .footer-mail { margin: 0 0 8px; max-width: 300px; }
  .footer-mail img { width: 100%; }
  .footer-addr { grid-column: 1 / -1; margin: 0 0 6px; text-align: center; font-size: 13px; line-height: 1.45; }
  .footer-sns {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 0 5px;
  }
  .footer-sns li { float: none; margin: 0; }
  .footer-sns img { width: 32px; height: auto; }
  .footer-info {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 13px;
    line-height: 1.45;
    margin: 0 auto 8px;
    max-width: 340px;
  }
  .footer-info p { margin-bottom: 4px; }
  /* 店舗写真と地図はスマホでは出さない。
     写真はページ上部に既にあり、地図は下部の「アクセス」から開ける */
  .footer-img,
  .footer-gmap { display: none; }
  .info-wrap { padding-bottom: 8px; }
  .footer-copyright { padding: 9px 0 7px; font-size: 11px; line-height: 1.4; }

  /* 丸い LINE ボタンは出さない。
     下部の固定ボタンに「LINEを送る」があるので重複する */
  #float-btn { display: none; }

  /* 「ページ上部へ」ボタン。画像右下の不透明な茶色は、
     実寸・元の縦位置ならフッターの単色部分に溶け込む */
  .pagetop-btn {
    width: 100%;
    right: auto;
    left: 0;
    top: -7px;
    text-align: center;
  }
  .pagetop-btn img { display: inline-block; width: 74px; height: 69px; }

  /* 下部固定ボタン: 電話する / LINEを送る / アクセス ----- */
  .fixed-footer {
    display: block;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .fixed-footer ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .fixed-footer li {
    flex: 1 1 0;
    list-style: none;
    background: url(/images/sphone/fixed-footer-bg01.png) repeat-x 0 0;
    background-size: auto 100%;
  }
  .fixed-footer li:nth-child(2) {
    background-image: url(/images/sphone/fixed-footer-bg03.png);
  }
  .fixed-footer li:nth-child(3) {
    background-image: url(/images/sphone/fixed-footer-bg04.png);
  }
  .fixed-footer li a {
    display: block;
    text-align: center;
  }
  .fixed-footer li a img {
    display: block;
    height: 52px;
    width: auto;
    margin: 0 auto;
  }

  /* ------- 2026-09-25 施主指摘ぶん ------- */

  /* A-1: 本文の <br> は PC 幅前提で入っている。
     スマホでは自然な折り返しと二重になり「相模原市藤/野地区の、」のように割れるため、
     本文全体で改行を無効化し、自然な折り返しに任せる。
     各文は「。」で終わるので、続けても読みづらくならない */
  .main-message-body p br { display: none; }
  /* ただし「〇お店からのお約束」の直後だけは見出し行なので改行を残す
     （この <br> だけが <strong> の直接の子。他は <span> の中） */
  .main-message-body p > strong > br { display: revert; }

  /* A-2 / A-3: 段落が詰まって「お店からのお約束」が直前とくっつく。
     間隔を空け、約束以降は左に寄せて本文と区別する */
  .main-message-body > p + p {
    margin-top: 1.7em;
    padding-left: 1em;
    border-left: 3px solid #f0e2bd;
  }

  /* B-2: 見出しのキャラクターアイコン（h3.png 700x47 / h4.jpg 700x43）は
     background-position が下端固定。行が 42px しかないと上が切れて頭が欠ける */
  .entry-content h3 { min-height: 47px; box-sizing: border-box; }
  .entry-content h4 { min-height: 43px; box-sizing: border-box; }

  /* B-3: 本文下の「コンテンツ」ナビはハンバーガーメニューで代替済み */
  #sidebar { display: none; }

  /* C-1: フッターの【営業案内】【電車でのアクセス】【お車でのアクセス】の区切り */
  .footer-info h3 { margin-top: 1.1em; }
  .footer-info h3:first-child { margin-top: 0; }

  /* D: sub-bg.png（1920x322）は上端で花が切れている素材。
     PC では画面最上部に来るので「外に続く」ように見えて自然だが、
     スマホでヘッダー下端に置くと切れた花が黄色の途中に浮いてしまう。
     ヘッダーは無地の黄色にし、画像は下半分（茶色の帯と 3 人の子ども）だけを
     擬似要素で帯として出す。上半分は要素の外に出るので切り取られる */
}

/* PC（旧レイアウトの絶対配置は維持し、今回の修正だけを上書き） */
@media screen and (min-width: 901px) {
  #float-btn {
    top: auto;
    right: 28px;
    bottom: 28px;
  }

  body.home {
    background-image: none;
  }

  .home #header {
    margin-bottom: 20px;
    background-color: #fee383;
    background-image: url(/images/default/home-bg.png);
    background-repeat: no-repeat;
    background-position: center top;
    /* 下限は原寸の 1920px。これ未満の画面では元サイトと同じ見え方になり、
       1920px 前後から 118% に拡大して左端の赤茶色オブジェクトを画面外へ逃がす
       （赤茶色は幅 140px 程度。1920px のとき片側 173px が切れる） */
    /* 背景は必ずビューポートより広く描き、左右を切って
       左端の赤茶色オブジェクトを画面外へ逃がす。
       上端基準にしないと、絵の上部（茶色の角）が切れて
       茶色が中途半端な位置に帯のように見えてしまう。
       高さ = 幅 x 653/1920。px分岐 2293x0.3401=780px、%分岐 1.20x0.3401=40.81vw。
       #header-inner の height をこれと一致させること（片方だけ変えると帯がずれる） */
    background-size: max(2293px, 120%) auto;
  }

  .home #header-inner {
    height: max(780px, 40.81vw);
  }
}

/* 細い端末 --------------------------------------------------- */
@media screen and (max-width: 420px) {
  .header-logo, .home .header-logo { max-width: 172px; }
  .mainbn li { width: 47%; }
}

/* 電子処方せんの注記。本文の最後に小さく添える（PC・スマホ共通）。
   スマホ側に #main p { font-size:16px } があるので、
   同等以上の詳細度（#main p.denshi-note）で指定しないと効かない */
#main p.denshi-note,
.denshi-note {
  margin: 28px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: #6d6157;
  text-align: left;
}
