/* 紡盛堂 — 新しい見た目。style.css の後に読み込み、色の変数・上の帯・いちばん下・一覧・品物のページを受け持つ。
   記事と固定ページの本文は style.css のまま（色の変数だけ、明るい版・暗い版で入れ替わる） */

/* ---- 色（2組）。写真の後ろはどちらも白 ---- */
:root{--ground:#e9e8e3;--surface:#ffffff;--ink:#1b1a18;--sub:#55514a;--line:#cfccc4;--accent:#6b4f20;--sold:#8a8378;
 --card:#ffffff;--price:#1b1a18;--on-bg:#1b1a18;--on-ink:#ffffff;--panel:#f4f3ef;
 --min:"Hiragino Mincho ProN","Yu Mincho","YuMincho","Noto Serif JP","Noto Serif CJK JP",serif;
 --go:"Hiragino Kaku Gothic ProN","Hiragino Sans","Yu Gothic Medium","YuGothic","Noto Sans JP","Meiryo",sans-serif}
/* 暗い版は真っ黒にせず、濃いグレー */
html[data-theme="dark"]{--ground:#2c2b29;--surface:#373633;--ink:#edebe6;--sub:#bcb8af;--line:#484641;--accent:#d8ba7a;--sold:#a39d92;
 --card:transparent;--price:#d8ba7a;--on-bg:#edebe6;--on-ink:#2c2b29;--panel:#373633}
html[data-theme="dark"] .post-body blockquote{color:var(--sub)}
/* 固定ページのいちばん下のロゴ（黒い版）は、暗い版では白く反転して見えるようにする */
html[data-theme="dark"] .post-body img[src$="logo_yoko_black.svg"]{filter:invert(1)}
body{background:var(--ground);color:var(--ink)}
.num{font-variant-numeric:tabular-nums}
html.menu-open{overflow:hidden}

/* ---- 上の帯：ロゴ（WordPress と同じくらいの大きさ）とメニュー ---- */
/* 上の帯は、スクロールしても画面の上に残る。PC は出たまま。スマホは、下へ送ると引っ込み、少し上へ戻すと出る
   （html.hd-up は shop.js が付ける）。引っ込める動きは top で付ける：transform を使うと、中にある引き出し（.mn・画面に固定）が
   帯の中に閉じ込められる。暗い所（.ov）を帯の中に置いているのも、帯に重なりの順（z-index）を付けたため */
.hd{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:10px;padding:20px 14px 20px 20px;background:var(--ground);border-bottom:1px solid var(--line)}
html{scroll-padding-top:calc(var(--hdh,97px) + 12px)}
.hd .lg img{height:56px;width:auto}
.hd .lg .lg-d,html[data-theme="dark"] .hd .lg .lg-l{display:none}
html[data-theme="dark"] .hd .lg .lg-d{display:block}
.hd .sp{flex:1}
.hb,.mn .cl button{flex:none;width:44px;height:44px;border:0;background:transparent;color:inherit;position:relative;cursor:pointer}
.hb i{position:absolute;left:11px;right:11px;height:2px;background:currentColor}
.hb i:nth-child(1){top:14px}.hb i:nth-child(2){top:21px}.hb i:nth-child(3){top:28px}
.mn ul{list-style:none;margin:0;padding:0}
.mn a,.mn .mh,.mn button.tm{display:block;width:100%;text-align:left;padding:14px 22px;border:0;border-bottom:1px solid var(--line);background:none;color:var(--ink);text-decoration:none;font-size:15px;line-height:1.6;cursor:pointer}
.mn a{font-family:var(--min);font-size:16px;letter-spacing:.08em}
.mn li li a,.mn li li button.tm{padding-left:42px;color:var(--sub)}
.mn li li a{font-size:15px}
.mn li li button.tm{font-family:var(--go);font-size:14px}
.mn .mh{color:var(--sub);font-size:13px;padding-bottom:6px;border-bottom:0}
.mn button.tm[aria-pressed="true"]{color:var(--ink)}
.mn button.tm[aria-pressed="true"]::before{content:"✓";display:inline-block;width:1.4em;margin-left:-1.4em}
.mn .cl{display:flex;justify-content:flex-end;padding:22px 14px 14px;border-bottom:1px solid var(--line)}
.mn .cl button i{position:absolute;left:10px;right:10px;top:21px;height:2px;background:currentColor;transform:rotate(45deg)}
.mn .cl button i+i{transform:rotate(-45deg)}
.ov{display:none}

/* スマホ：メニューは右から出る引き出し。×・暗い所・Esc・項目を選ぶ、で引っ込む */
@media (max-width:699px){
.mn{position:fixed;top:0;bottom:0;right:0;z-index:61;width:min(84vw,330px);overflow-y:auto;background:var(--panel);box-shadow:-10px 0 30px rgba(0,0,0,.28);transform:translateX(105%);visibility:hidden}
html.menu-open .mn{transform:none;visibility:visible}
/* すべる動きは、ボタンで開け閉めしたときだけ付ける（menu-anim は shop.js が付ける）。画面の幅が変わっただけのとき
   （スマホを横から縦に回したときなど）に、引き出しが一瞬すべって見えるのを防ぐ */
html.menu-anim .mn{transition:transform .22s ease-out,visibility 0s .22s}
html.menu-anim.menu-open .mn{transition:transform .22s ease-out}
html.menu-open .ov{display:block;position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.5)}
.hd{transition:top .22s ease-out}
html.hd-up .hd{top:calc(-1 * var(--hdh,97px) - 2px)}
}
@media (prefers-reduced-motion:reduce){.mn,.hd{transition:none!important}}

/* ---- 切り替え（2段とも：選んでいるもの＝墨色の文字と下線／選んでいないもの＝薄い文字） ---- */
.sts,.tabs{display:flex;overflow-x:auto;scrollbar-width:none}
.sts{gap:26px;padding:14px 16px 0}
.tabs{gap:22px;padding:0 16px;margin-bottom:14px;border-bottom:1px solid var(--line)}
.sts button,.tabs button{position:relative;padding:0 1px;border:0;background:none;white-space:nowrap;font-family:var(--min);letter-spacing:.1em;color:var(--sub);cursor:pointer}
.sts button{min-height:46px;font-size:19px;font-weight:600}
.tabs button{min-height:46px;font-size:15px}
.sts button i,.tabs button i{font-style:normal;font-family:var(--go);font-weight:400;font-size:11px;letter-spacing:0;margin-left:5px;vertical-align:.5em;opacity:.85}
.sts button.on,.tabs button.on,.sts button:hover,.tabs button:hover{color:var(--ink)}
.sts button.on::after,.tabs button.on::after{content:"";position:absolute;left:0;right:0;height:2px;background:var(--ink)}
.sts button.on::after{bottom:6px}
.tabs button.on::after{bottom:-1px}
.tabs button[hidden]{display:none}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- 一覧（写真の格子）。名前＝明朝／数字と細かい情報＝ゴシック ---- */
.g{display:grid;grid-template-columns:repeat(2,1fr);grid-auto-flow:dense;gap:6px;padding:0 6px}
html[data-theme="dark"] .g{gap:18px 10px;padding:0 10px}
.c{display:flex;flex-direction:column;background:var(--card);min-width:0;color:var(--ink);text-decoration:none}
.c[hidden]{display:none}
.sq{display:block;aspect-ratio:1;background:#fff;overflow:hidden}
.sq img{width:100%;height:100%;object-fit:contain}
.c .tl{display:flex;flex-direction:column;gap:1px;padding:9px 10px 11px;font-size:13px;line-height:1.6}
.c .nm{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--min);font-size:14.5px;font-weight:600;letter-spacing:.05em}
.c .pr{white-space:nowrap;color:var(--price)}
.c .rf{font-size:12px;white-space:nowrap;color:var(--sub)}
html[data-theme="dark"] .c .tl{padding:8px 2px 0}
.c.big{grid-column:span 2}
.c.big .sq{aspect-ratio:4/3}
.c.big .tl{flex-direction:row;justify-content:space-between;align-items:baseline;gap:10px;font-size:16px;padding:11px 12px 15px}
.c.big .nm{font-size:18px}
html[data-theme="dark"] .c.big .tl{padding:10px 2px 0}
.c:hover{color:var(--ink)}
.c:hover .nm{text-decoration:underline;text-underline-offset:4px}
.archive .g{padding:0;margin-bottom:8px}
.related .g{padding:0}

/* ---- 文章のページ（固定ページ・記事）：文章は白い面に載せる。
   面の色は一覧の枠と同じ --card（明るい版＝白／暗い版＝透明＝地のまま）。暗い版でも面を付けるなら --card を --surface に替える。
   面の中の囲み（問い合わせの箱・目次）は、白に白で沈まないようにメニューの面の色にする ---- */
.post,.page{background:var(--card)}
.contact-box,.toc{background:var(--panel)}
.contact-box{margin-bottom:22px}
.related{margin-top:40px}

/* ---- いちばん下 ---- */
.ft{margin-top:48px;padding:28px 16px 56px;font-size:12px;line-height:2.1;text-align:center;color:var(--sub);border-top:1px solid var(--line)}
.ft p{margin:0}
/* いちばん下のリンクは下線なし（並んでいる場所でリンクと分かる。マウスを乗せたとき・キーで選んだときだけ下線） */
.ft a{color:inherit;text-decoration:none;text-underline-offset:3px;display:inline-block;padding:4px 6px}
.ft a:hover,.ft a:focus-visible{color:var(--ink);text-decoration:underline}
.ft .cp{margin-top:14px;letter-spacing:.04em}

/* ---- 品物のページ ---- */
.dp .back{display:inline-flex;align-items:center;min-height:46px;padding:0 16px;font-size:13px;color:var(--sub);text-decoration:none}
.dp .top{position:relative}
.gal .stg{position:relative;background:#fff}
.gal .strip{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
.gal .strip::-webkit-scrollbar{display:none}
.gal .strip .sq{flex:0 0 100%;scroll-snap-align:start;position:relative}
.gal .pv{position:absolute;top:50%;z-index:3;width:44px;height:44px;margin-top:-22px;border:0;border-radius:50%;background:rgba(255,255,255,.94);box-shadow:0 1px 3px rgba(0,0,0,.18),0 4px 14px rgba(0,0,0,.14);transition:opacity .16s,transform .16s;cursor:pointer}
.gal .pv.prev{left:10px}.gal .pv.next{right:10px}
.gal .pv i{position:absolute;left:50%;top:50%;width:10px;height:10px;border-right:2px solid #1b1a18;border-bottom:2px solid #1b1a18}
.gal .pv.next i{transform:translate(-70%,-50%) rotate(-45deg)}
.gal .pv.prev i{transform:translate(-30%,-50%) rotate(135deg)}
.gal .pv:hover{transform:scale(1.06)}
.gal .pv:disabled{opacity:0;pointer-events:none}
.gal .ct{position:absolute;right:10px;bottom:10px;z-index:3;font-size:12px;line-height:1;padding:5px 10px;border-radius:11px;background:rgba(27,26,24,.72);color:#fff}
.gal .ths{display:flex;gap:6px;padding:8px 14px 0;overflow-x:auto;scrollbar-width:none}
.gal .ths button{flex:none;width:58px;height:58px;padding:0;border:1px solid var(--line);background:#fff;opacity:.62;transition:opacity .16s;cursor:pointer}
.gal .ths button img{width:100%;height:100%;object-fit:contain}
.gal .ths button.on{opacity:1;outline:2px solid var(--ink);outline-offset:-2px}
/* マウスのある端末の拡大。狭い画面＝枠の中で拡大／広い画面＝写真の上に見ている範囲の枠＋右側に拡大の窓 */
@media (hover:hover) and (pointer:fine){.gal .strip .sq{cursor:zoom-in}.gal .strip .sq.zm img{transition:transform .14s ease-out;transform:scale(2.4)}}
.lens{position:absolute;left:0;top:0;width:33.333%;height:33.333%;background:rgba(110,130,165,.22);outline:1px solid rgba(60,80,115,.55);pointer-events:none}
.zp{position:absolute;top:0;right:28px;z-index:6;width:calc((100% - 88px) * .4);aspect-ratio:1;overflow:hidden;background:#fff;border:1px solid var(--line);box-shadow:0 12px 34px rgba(0,0,0,.22);pointer-events:none}
.zp img{width:300%;height:300%;max-width:none;object-fit:contain}
.di{padding:18px 16px 10px}
.di .kd{display:inline-block;font-size:11px;line-height:1.6;background:#77736b;color:#fff;padding:2px 8px}
.di h1{font-family:var(--min);font-size:24px;font-weight:600;letter-spacing:.06em;line-height:1.4;margin:8px 0 6px}
.di .dpr{margin:0;font-size:22px;font-weight:600;line-height:1.6;color:var(--price)}
.di .dpr small{font-size:12px;font-weight:400;color:var(--sub);margin-left:8px}
.di .dpr small{white-space:nowrap}
/* 価格の下の注意（沖縄・離島の送料）。小さい字で1つの段落にし、言葉の切れ目で折り返す */
.di .dnote{margin:4px 0 0;font-size:12px;line-height:1.7;color:var(--sub);word-break:auto-phrase;text-wrap:pretty}
.di .rfn{margin:0 0 16px;font-size:14px;color:var(--sub)}
a.dbt{display:block;text-align:center;background:var(--on-bg);color:var(--on-ink);text-decoration:none;padding:15px;font-size:15px;line-height:1.6;letter-spacing:.06em;margin:14px 0 18px}
a.dbt:hover{color:var(--on-ink);opacity:.88}
.spec{margin:0}
.spec div{display:flex;gap:14px;padding:9px 0;border-top:1px dotted var(--line);font-size:13.5px;line-height:1.6}
.spec div:last-child{border-bottom:1px dotted var(--line)}
.spec dt{flex:none;width:3.2em;color:var(--sub)}
.spec dd{margin:0}
.dp .item-body{padding:8px 16px 0}
.dp .more{margin-top:18px;padding:8px 14px 0}
.dp .more h2{font-family:var(--min);font-size:17px;font-weight:600;letter-spacing:.1em;margin:0;padding:18px 0 12px;border-top:1px solid var(--line)}
.dp .more .g{padding:0}

@media (min-width:700px){
.hd{padding:18px 28px;gap:22px}
.hd .lg img{height:60px}
.hb,.mn .cl{display:none}
.mn>ul{display:flex;gap:26px;align-items:center}
.mn a,.mn .mh,.mn button.tm{border:0;padding:12px 0;width:auto}
.mn a{font-size:15px}
.mn .mh{font-size:14px;cursor:default;padding-bottom:12px}
.mn li{position:relative}
.mn li ul{display:none;position:absolute;left:-16px;top:100%;z-index:20;min-width:170px;background:var(--panel);border:1px solid var(--line);box-shadow:0 12px 24px rgba(0,0,0,.18)}
.mn li:last-child ul{left:auto;right:-8px;min-width:230px}
.mn li:hover ul,.mn li:focus-within ul{display:block}
.mn li li a,.mn li li button.tm{padding:10px 16px 10px 34px;width:100%;color:var(--ink)}
.mn li li a{padding-left:16px}
.mn li li a:hover,.mn li li button.tm:hover{background:var(--ground)}
/* 文章の白い面は、上の帯から少し離して置く。面の内側の余白を引いた文章の幅は 720px（前と同じ） */
.post.wrap-narrow,.page.wrap-narrow{max-width:820px;margin-top:28px;padding:44px 50px 56px}
.sts,.tabs{padding-left:28px;padding-right:28px}
.sts{padding-top:26px}
.tabs{gap:34px;margin-bottom:20px}
.g{grid-template-columns:repeat(4,1fr);gap:10px;padding:0 28px}
html[data-theme="dark"] .g{gap:28px 18px;padding:0 28px}
/* 大きい枠は2×2。写真は「正方形を下限に、2行分の高さまで伸ばす」。
   前は高さを残りに合わせるだけだったので、一覧の終わりで2行目が埋まらないと横長につぶれた。1回目の直し（上にそろえるだけ）では、
   スマホ用の 4:3 が残って横長になり、下に空きも出た */
.c.big{grid-row:span 2}
.c.big .sq{aspect-ratio:1;flex:1 0 auto}
/* 大きい枠の品名と価格は、小さい枠と同じ形（品名の下に価格・同じ字の大きさ）にする。品名の欄の高さがそろうので、
   隣の小さい枠と写真（白い部分）の下の線がそろう */
.c.big .tl{flex-direction:column;justify-content:normal;align-items:normal;gap:1px;font-size:13px;padding:9px 10px 11px}
.c.big .nm{font-size:14.5px}
html[data-theme="dark"] .c.big .tl{padding:8px 2px 0}
.dp{max-width:1240px;margin:0 auto}
.dp .back{padding-left:28px}
.dp .top{display:grid;grid-template-columns:3fr 2fr;gap:32px;padding:0 28px;align-items:start}
.gal{min-width:0}
.gal .ths{padding:10px 0 0}
.gal .ths button{width:76px;height:76px}
.dp .di{padding:6px 0 0;container-type:inline-size}
/* 広い画面では、送料の注意を説明の列の幅に合わせて小さくし、1行に収める（10px より小さくはしない。収まらない幅では折り返す） */
.di .dnote{font-size:clamp(10px,calc(100cqw / 40),11.5px);letter-spacing:0}
.dp .item-body{padding:16px 28px 0}
.dp .more{padding:24px 28px 0}
}
@media (min-width:1100px){.g{grid-template-columns:repeat(6,1fr)}.archive .g,.related .g{grid-template-columns:repeat(4,1fr)}}
@media (prefers-reduced-motion:no-preference){.c .sq img{transition:transform .5s ease-out}.c:hover .sq img{transform:scale(1.03)}}
