/* 水麺商店

   2026-08-20 デザイン方針を変更した。
   ヘッダー・フッター・ロゴは公式サイト(waterramen.com)準拠のまま残し、
   売り場（ヒーロー〜商品〜スペック〜カート）は無彩色に引き算する。

   🚨 公式サイトの意匠（明るい青のピルボタン・大きな角丸・影・セクションごとの背景色）を
      ECにそのまま持ち込むと、店の装飾が商品写真より前に出てしまう。
      目標は「色を持っているのは商品写真だけ」という状態。
      青は ヘッダー / フッター / フォーカスリング 以外では使わない。

   2026-08-19 改修: トップは「柄を選ぶ場」、商品ページ(.pdp)は「色とサイズを決める場」。 */
:root {
  /* 公式ロゴ（水入りラーメン丼）から抽出した色。売り場では使わない */
  --blue: #169fff;
  --blue-on-light: #0a6fc0;
  --red: #e2000a;

  --base-900: #05101c;
  --ink: #0a1725;
  --text: #33454f;   /* 白地で 9.3:1 */
  --muted: #55687a;  /* 白地で 6.0:1 */
  --line: #e4e7ea;       /* 青みを抜いたグレー（旧 #dde6ef は青が乗っていた） */
  --surface-alt: #f6f7f8; /* 同上（旧 #f3f7fb） */
  --on-dark-muted: #a3b9cd;

  /* 🚨 角丸はここで一括管理する。個別に 8px / 14px / 999px を書き足さない */
  --radius: 2px;
  --wrap: 1120px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 15.5px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
/* 見出しは 800 だと紙面が重い。700 にして字間で締める */
h1, h2, h3 { color: var(--ink); line-height: 1.5; font-weight: 700; letter-spacing: .02em; }
a { color: var(--ink); text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; }

/* キーボード操作の人が、ヘッダのリンクを全部たどらずに本文へ飛べるようにする */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 20px;
  text-decoration: none; font-size: 14px; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------- 告知バー・看板 */
/* 🚨 送料と納期の置き場所はこのバー1本。他の場所に書かない */
.notice-bar {
  background: var(--surface-alt); border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--text); text-align: center;
  padding: 9px 24px; margin: 0;
}
/* トップの看板。店名と一言だけ。価格やスペックを並べない（棚の仕事） */
.signboard { border-bottom: 1px solid var(--line); }
.signboard-inner { padding-block: clamp(26px, 4vw, 42px); }
.signboard h1 { font-size: clamp(20px, 2.6vw, 26px); }
.signboard p { margin-top: 4px; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------ header */
/* ここは公式サイト準拠のまま。公式から来た人が同じブランドだと分かる唯一の手がかり */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(5, 16, 28, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-inner {
  padding-block: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-text { display: grid; line-height: 1.35; }
/* 🚨 policies.html と admin.html は .brand-text で包まず strong/span を直接置いている。
      .brand-text 配下だけに色を当てると、濃紺ヘッダーの上に本文色（濃いグレー）の
      店名が出て読めなくなる。子孫セレクタにして両方の書き方をカバーする */
.brand strong { font-size: 17px; color: #fff; letter-spacing: .06em; }
.brand span { font-size: 9px; letter-spacing: .3em; color: var(--on-dark-muted); }
.header-nav { display: flex; align-items: center; gap: 26px; }
.header-nav a {
  font-size: 14px; font-weight: 700; letter-spacing: .06em;
  text-decoration: none; color: #fff; opacity: .82;
}
.header-nav a:hover { opacity: 1; }
.cart-button {
  position: relative; border: 1px solid rgba(255, 255, 255, .4); background: none;
  color: #fff; border-radius: 999px; padding: 9px 22px; font-size: 13px; font-weight: 700;
}
.cart-button:hover { background: rgba(255, 255, 255, .12); }
.cart-count {
  position: absolute; top: -7px; right: -7px;
  background: #fff; color: var(--base-900); font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 5px;
}
/* 0でも消さない。店が状態を持っていることを見せる */
.cart-count.is-zero { background: rgba(255,255,255,.22); color: #fff; }

/* .hero-cta は商品ページ（もう1柄セクション）で使用。旧ヒーロー自体は廃止済み */
.hero-cta {
  display: inline-block; background: var(--ink); color: #fff;
  text-decoration: none; font-weight: 700; font-size: 15px;
  border-radius: var(--radius); padding: 16px 46px;
  transition: background .15s;
}
.hero-cta:hover { background: #000; }
.hero-cta.ghost { background: none; border: 1px solid var(--line); color: var(--ink); }
.hero-cta.ghost:hover { background: var(--surface-alt); }

/* ------------------------------------------------------------ sections */
/* 🚨 ページ内の縦の基準線はこれ1本だけ。ヘッダー・ヒーロー・各セクション・フッターを
   同じ列に載せる。左端が複数あると、要素が「貼られている」ように見える */
.wrap, .section, .header-inner, .footer-inner, .copyright {
  max-width: var(--wrap); margin-inline: auto; padding-inline: 24px;
}
.section { padding-block: clamp(56px, 8vw, 92px); }
.section-head { margin-bottom: 36px; max-width: 760px; }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  color: var(--muted); margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(22px, 3vw, 30px); }
.section-head > p:last-child { margin-top: 14px; font-size: 15.5px; color: var(--muted); }

/* ------------------------------------------------- 柄を選ぶ（トップ） */
/* 🚨 枠線・角丸・影で囲うと「カード部品」が主役になる。
      写真を上・情報を下に積み、区切りは余白だけにする。 */
/* 🚨 ここを絞ってはいけない。以前 #items だけ max-width:988px にしたら、
      「商品」の見出しとカードだけが他のセクションより66px内側に入り、
      ページ内に左端が3種類できて「ベタ張り」に見える原因になった。
      売り場は他のセクションとまったく同じ列に載せる */
/* 🚨 2点しかないからと2列にすると1枚が512pxになり、商品カードではなく
      「大きな写真を2枚貼った」見え方になる。列幅のほうを商品カードの寸法(300px前後)で
      決めて、商品が増えたら列が埋まる形にする。ECの棚はこの作り */
.choose-grid {
  display: grid; gap: clamp(24px, 3vw, 36px);
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
.choose-card { display: block; }
.choose-photo { background: var(--surface-alt); }
/* 🚨 比率を固定する。固定しないと、色を切り替えたとき（着用写真↔商品単体）に
      写真の縦横比が変わってカードの高さが飛ぶ */
.choose-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 18%;
}
.choose-body { padding: 20px 0 0; }
.choose-no { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.choose-body h3 { font-size: 20px; margin-top: 6px; }
.choose-body h3 a { color: inherit; text-decoration: none; }
.choose-body h3 a:hover { text-decoration: underline; }
a.choose-photo { display: block; }
.choose-hook { font-size: 15px; color: var(--text); margin-top: 10px; }
/* 🚨 フック文が1行のカードと2行のカードで下の行（スウォッチ・価格）の高さがズレる。
   複数列で並ぶ幅のときだけ2行ぶんの高さを予約して揃える（1列のスマホでは予約しない） */
@media (min-width: 640px) {
  .choose-hook { min-height: calc(2em * 1.85); }
}
/* 🚨 棚カードは「写真・No.・名前・フック・スウォッチ・価格」まで（2026-08-21決定）。
   色ラベル・「選択中」・サイズ行・色名入りCTAは置かない＝カードをミニLPにしない。
   スウォッチを押すと写真が切り替わる（3色あることは見えたまま）。
   タップ領域は40x44pxを確保し、見た目の丸だけ18pxに絞る */
.choose-card { cursor: pointer; }
.choose-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
}
.color-picks { display: flex; }
.color-picks button {
  width: 40px; height: 44px; display: grid; place-items: center;
  border: 0; background: none; padding: 0;
}
.color-picks button span {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid #cfd5da;
}
.color-picks button[aria-pressed="true"] span {
  box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--ink);
}
.choose-price { font-size: 18px; font-weight: 700; color: var(--ink); }
.choose-price .tax { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 6px; }

/* ------------------------------------------------------- 箸置きの棚（トップ） */
/* 🚨 6種あること自体がこの商品の魅力。書籍カードを間借りして1点だけ200pxで出していたら
      「何の生き物か分からない・Tシャツの隣で格が下がって見える」となった（2026-08-27）。
      列数は固定する: auto-fill にすると幅次第で 4+2 のような半端な折り返しになり棚に見えない。
      価格はセクション見出しに1回だけ。タイルに繰り返すと反復が切り貼り感を作る */
.hashi-shelf {
  display: grid; gap: clamp(18px, 2.4vw, 28px);
  grid-template-columns: repeat(3, 1fr);
}
.hashi-tile { display: block; text-decoration: none; color: inherit; }
.hashi-tile-photo { display: block; position: relative; }
.hashi-tile img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block;
  background: var(--surface-alt);
}
.hashi-tile-name { display: block; margin-top: 10px; font-size: 15px; color: var(--text); }
.hashi-tile:hover .hashi-tile-name { text-decoration: underline; }
@media (max-width: 560px) {
  .hashi-shelf { grid-template-columns: repeat(2, 1fr); }
  .hashi-tile-name { font-size: 14px; }
}

/* ------------------------------------------------------------- 書籍 */
/* 🚨 書籍は在庫を持たずAmazonへ案内する売り場。棚カードとは別レイアウト（表紙＋情報の横組み）。
      売り場の無彩色ルールはここも同じ: CTAは黒・角丸2px・影なし */
.book-card {
  display: grid; grid-template-columns: 200px 1fr;
  gap: clamp(24px, 3vw, 36px); align-items: start; max-width: 680px;
}
.book-cover { display: block; background: var(--surface-alt); }
.book-cover img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.book-body h3 { font-size: 20px; margin-top: 6px; }
.book-body h3 a { color: inherit; text-decoration: none; }
.book-body h3 a:hover { text-decoration: underline; }
.book-body .choose-hook { min-height: 0; }
.book-meta { margin-top: 8px; font-size: 14px; color: var(--muted); }
.book-body .choose-price { margin-top: 12px; }
.book-cta {
  display: inline-block; margin-top: 16px; background: var(--ink); color: #fff;
  text-decoration: none; border-radius: var(--radius);
  padding: 13px 32px; font-size: 14px; font-weight: 700;
}
.book-note { margin-top: 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 560px) {
  .book-card { grid-template-columns: 128px 1fr; gap: 18px; }
  .book-body h3 { font-size: 17px; }
  /* 🚨 狭いカラムでは「Amazonで購入す/る」と折り返す。ブロックにして1行で収める */
  .book-cta { display: block; text-align: center; padding: 13px 10px; }
}

/* --------------------------------------------------- サイズ・素材・配送 */
.spec-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.spec-wrap h3 { font-size: 14px; letter-spacing: .04em; margin-bottom: 14px; }
.spec-note { font-size: 14px; color: var(--muted); margin-top: 16px; }
.spec-note strong { color: var(--ink); }
.spec-list { border-top: 1px solid var(--line); }
.spec-list > div {
  display: grid; grid-template-columns: 86px 1fr; gap: 18px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.spec-list dt { font-size: 14px; font-weight: 700; color: var(--ink); }
.spec-list dd { font-size: 15px; }
.spec-list strong { color: var(--ink); }

/* 🚨 塗りつぶしヘッダー＋ゼブラの表はExcelに見える。罫線は横だけ、色は付けない */
.size-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.size-table caption { font-size: 13.5px; color: var(--muted); text-align: left; padding-bottom: 12px; }
.size-table th, .size-table td {
  border: 0; border-bottom: 1px solid var(--line); padding: 12px 8px; text-align: center;
}
.size-table thead th {
  font-size: 13px; font-weight: 700; color: var(--muted);
  letter-spacing: .04em; border-bottom: 1px solid var(--ink);
}
.size-table tbody th { text-align: left; font-weight: 400; color: var(--ink); }

/* ------------------------------------------------------------ 作り方 */
/* 🚨 ここは「価格の根拠」。長文3本だったのを3行に圧縮した（2026-08-19）。
      欲しくなる前に読ませる分量にしない。
      刺繍の接写はここに置く（工程の話と接写が同じ画面にある状態を作る）。 */
.made-steps { list-style: none; counter-reset: made; border-top: 1px solid var(--line); }
.made-steps li {
  counter-increment: made; position: relative;
  padding: 14px 0 14px 40px; border-bottom: 1px solid var(--line); font-size: 15.5px;
}
.made-steps li::before {
  content: counter(made, decimal-leading-zero);
  position: absolute; left: 0; top: 15px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted);
}

/* ============================================================ 商品ページ */
.crumbs {
  max-width: var(--wrap); margin: 0 auto; padding: 18px 24px 0;
  font-size: 13px; color: var(--muted);
}
.crumbs a { color: var(--muted); }

.pdp {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) 24px clamp(48px, 7vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 42%);
  grid-template-rows: auto 1fr;
  grid-template-areas: "gallery head" "gallery buy";
  gap: clamp(20px, 3vw, 40px) clamp(28px, 4vw, 56px);
  align-items: start;
}
.pdp-head { grid-area: head; }
.pdp-gallery { grid-area: gallery; }
.pdp-buy { grid-area: buy; }
/* 🚨 minmax(0,…) と min-width:0 が無いと、横スクロールさせているサムネ列（1行最大8枚）の
   min-content 幅がグリッド列を押し広げ、スマホでページ全体が横に伸びる */
.pdp-gallery { min-width: 0; }
.gallery-main { position: relative; overflow: hidden; background: var(--surface-alt); }
.gallery-main img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
/* 🚨 枚数が色ごとに違う（2〜8枚）。折り返すとレイアウトが動くので1行固定・横スクロール */
.thumbs {
  display: flex; gap: 8px; margin-top: 10px;
  flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.thumbs::-webkit-scrollbar { display: none; }
.thumb {
  flex: 0 0 auto; width: 62px; height: 62px; padding: 0;
  border: 1px solid transparent; overflow: hidden;
  background: var(--surface-alt); opacity: .6; transition: opacity .15s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active, .thumb:hover { opacity: 1; }
.thumb.is-active { border-color: var(--ink); }

/* 見出しの意味の塊。塊の途中では折り返さない */
.nb { display: inline-block; }

.pdp-no { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.pdp-buy h1 { font-size: clamp(21px, 2.8vw, 27px); margin-top: 8px; }
.pdp-hook { font-size: 15px; color: var(--text); margin-top: 12px; }
.pdp-price {
  font-size: 26px; font-weight: 700; color: var(--ink);
  margin-top: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.pdp-price span { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.pdp-lead { font-size: 15px; margin-top: 16px; }
.pdp-field { margin-top: 24px; }
.field-label {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--ink);
  margin-bottom: 10px;
}
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; border-radius: var(--radius);
  padding: 10px 16px 10px 12px; font-size: 14px; color: var(--ink);
  transition: border-color .15s;
}
.swatch span { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #cfd5da; }
.swatch:hover { border-color: var(--ink); }
.swatch.is-active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt {
  border: 1px solid var(--line); background: #fff; border-radius: var(--radius);
  min-width: 56px; padding: 12px 4px; font-size: 15px; color: var(--ink);
  transition: border-color .15s, background .15s;
}
.opt:hover:not(:disabled) { border-color: var(--ink); }
.opt.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.opt:disabled { color: #c3ccd4; background: #fafbfc; text-decoration: line-through; cursor: not-allowed; }
.size-link {
  border: none; background: none; color: var(--ink); font-size: 13px;
  text-decoration: underline; text-underline-offset: 3px; padding: 0; letter-spacing: 0;
}
.size-hint { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.stock-note { min-height: 24px; font-size: 14px; color: var(--red); margin-top: 12px; }

.buy-row { display: flex; gap: 10px; margin-top: 4px; }
.qty { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 10px; font-size: 13px; color: var(--ink); }
.add-button {
  flex: 1; background: var(--ink); color: #fff; border: none;
  border-radius: var(--radius); padding: 16px 10px; font-size: 15px; font-weight: 700;
  transition: background .15s;
}
.add-button:hover:not(:disabled) { background: #000; }
.add-button:disabled { background: #c3ccd4; cursor: not-allowed; }

/* 丸ポチではなく罫線の行にする（ヒーローのスペックと同じ組み方に揃える） */
.assure { list-style: none; margin-top: 24px; border-top: 1px solid var(--line); }
.assure li { font-size: 14.5px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.assure strong { color: var(--ink); }
/* 偽の公式ショップと区別できるように、購入操作のすぐ下で販売主体を名乗る */
.seller {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.seller a { color: var(--muted); }
.made-head { font-size: 15px; margin-top: 28px; margin-bottom: 12px; }

/* ------------------------------------------------ 商品ページ: 発見セクション */
.find {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center;
}
.find-photo img { width: 100%; background: var(--surface-alt); }
.find-body h2 { font-size: clamp(22px, 3vw, 30px); }
.find-body > p { font-size: 15px; margin-top: 16px; }
.find-list { margin-top: 24px; border-top: 1px solid var(--line); }
.find-list > div {
  display: grid; grid-template-columns: 64px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.find-list dt { font-size: 18px; font-weight: 700; color: var(--ink); }
.find-list dd { font-size: 15px; }

/* --------------------------------------------------- サイズ表（実データ） */
.size-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 48px); align-items: start; }
.size-notes h3 { font-size: 15px; margin-bottom: 8px; }
.size-notes h3 + p { font-size: 15px; margin-bottom: 20px; }

/* ------------------------------------------------ 商品ページ: もう1柄 */
.other {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center;
}
.other h2 { font-size: clamp(21px, 3vw, 28px); margin-top: 6px; }
.other p { font-size: 15px; margin: 14px 0 26px; }
.other img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%;
  background: var(--surface-alt);
}

/* ------------------------------------------------------------ size chart */
.chart-modal {
  position: fixed; inset: 0; background: rgba(5, 16, 28, .6); z-index: 40;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.chart-modal[hidden] { display: none; }
.chart-inner {
  position: relative; background: #fff; border-radius: var(--radius); padding: 32px;
  max-width: 720px; width: 100%; max-height: 88vh; overflow-y: auto;
}
.chart-inner h2 { font-size: 18px; margin-bottom: 10px; }
.chart-inner > p { font-size: 13px; margin-bottom: 18px; }
.chart-note { margin: 14px 0 0 !important; color: var(--muted); font-size: 13.5px !important; }
.chart-close {
  position: absolute; top: 12px; right: 16px; border: none; background: none;
  font-size: 26px; line-height: 1; color: var(--muted);
}

/* ------------------------------------------------------------ cart */
.cart-overlay { position: fixed; inset: 0; background: rgba(5, 16, 28, .5); z-index: 30; }
/* display:flex等がhidden属性に勝ってしまうのを防ぐ */
.cart-panel[hidden], .cart-overlay[hidden], .cart-count[hidden], .chart-modal[hidden],
.checkout-button[hidden], .promo-optin[hidden], .cart-note[hidden] { display: none; }
.cart-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
  background: #fff; z-index: 31; padding: 26px 24px; overflow-y: auto;
  border-left: 1px solid var(--line); display: flex; flex-direction: column;
}
.cart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cart-head h2 { font-size: 17px; }
.cart-close { border: none; background: none; font-size: 26px; line-height: 1; color: var(--muted); }
.cart-items { flex: 1; }
.cart-empty { color: var(--muted); font-size: 14px; padding: 28px 0 14px; text-align: center; }
/* 空カートの主操作は「売り場へ戻る」。無効な購入ボタンではない */
.cart-back {
  display: block; text-align: center; border: 1px solid var(--ink);
  border-radius: var(--radius); padding: 13px; color: var(--ink);
  text-decoration: none; font-size: 14px; font-weight: 700;
}
.cart-back:hover { background: var(--surface-alt); }
.cart-item {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px;
  border-bottom: 1px solid var(--line); padding: 14px 0; font-size: 14.5px;
}
.ci-name { grid-column: 1 / -1; font-weight: 700; color: var(--ink); }
.ci-controls { display: flex; align-items: center; gap: 9px; }
.ci-controls button {
  border: 1px solid var(--line); background: #fff; border-radius: var(--radius);
  width: 28px; height: 28px; color: var(--ink);
}
.ci-remove { width: auto !important; padding: 0 10px; font-size: 11px; color: var(--muted); }
.ci-price { text-align: right; font-weight: 700; color: var(--ink); }
.cart-summary { border-top: 1px solid var(--ink); margin-top: 12px; padding-top: 14px; font-size: 14px; }
.sum-row { display: flex; justify-content: space-between; padding: 3px 0; }
.sum-total { font-size: 17px; font-weight: 700; color: var(--ink); margin-top: 8px; }
.sum-hint { font-size: 12px; color: var(--muted); text-align: right; }
/* 販促メールの同意。購入の邪魔をしないよう、ボタンの手前に小さく置く */
.promo-optin {
  display: flex; gap: 9px; align-items: flex-start;
  margin-top: 14px; font-size: 13px; color: var(--muted); line-height: 1.6; cursor: pointer;
}
.promo-optin input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ink); flex: 0 0 auto; }
.checkout-button {
  margin-top: 16px; background: var(--ink); color: #fff; border: none;
  border-radius: var(--radius); padding: 16px; font-size: 15px; font-weight: 700;
  transition: background .15s;
}
.checkout-button:hover:not(:disabled) { background: #000; }
.checkout-button:disabled { background: #c3ccd4; cursor: not-allowed; }
.cart-note { font-size: 14px; color: var(--muted); margin-top: 12px; line-height: 1.7; }
.cart-error { color: var(--red); font-size: 13px; margin-top: 10px; }
.cart-error[hidden] { display: none; }

/* ------------------------------------------------------------ footer */
/* ヘッダーと同じく公式サイト準拠のまま。ただし見出しの青は読みにくいのでグレーに */
.site-footer { background: var(--base-900); color: #fff; padding: 60px 0 32px; }
.footer-inner {
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { display: block; font-size: 16px; color: #fff; }
.footer-brand span { font-size: 13px; color: var(--on-dark-muted); }
.footer-nav { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-nav h3 {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  color: var(--on-dark-muted); margin-bottom: 14px;
}
.footer-nav a {
  display: block; font-size: 15px; color: #dfe9f3;
  text-decoration: none; margin-bottom: 9px;
}
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.copyright {
  margin-top: 44px; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 13px; color: var(--on-dark-muted);
}

/* ------------------------------------------- policies / success / admin */
.doc { max-width: 780px; margin: 0 auto; padding: 56px 24px 88px; }
.doc h1 { font-size: 26px; margin-bottom: 30px; }
.doc h2 { font-size: 19px; margin: 46px 0 16px; border-bottom: 1px solid var(--ink); padding-bottom: 8px; }
.doc h3 { font-size: 15px; margin: 28px 0 10px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; }
.doc th, .doc td { border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
.doc th { width: 32%; font-weight: 700; color: var(--ink); }
.doc p, .doc li { font-size: 15px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.success-box { max-width: 560px; margin: 96px auto; padding: 0 24px; text-align: center; }
.success-box h1 { font-size: 24px; margin-bottom: 18px; }
.order-no {
  display: inline-block; margin-top: 20px; padding: 8px 20px;
  background: var(--surface-alt); border-radius: var(--radius);
  font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: .04em;
}
.order-no[hidden] { display: none; }
/* LINE導線。2つの条件が別々のタイミングで決まるので、両方CSSで表現する。
   ① LINE_URL が入っている（line.js が <html data-line="on"> を立てる）
   ② 完了画面は、注文内容を確認できたときだけ（success.html が <html data-order="ok"> を立てる）
   🚨 hidden属性の付け外しでやるとスクリプトの実行順で結果が変わる。実際に
      「ご注文を確認できませんでした」の画面にLINEの案内が出た
   🚨 セレクタは `a[data-line-cta]` まで書く。`[data-line-cta]` だけだと詳細度が
      (0,1,0) で `.footer-nav a` (0,1,1) に負け、URL未設定でもフッターに出てしまう
      （実際に出た。ブラウザで計算値を見て気づいた） */
a[data-line-cta], .line-invite { display: none; }
html[data-line="on"] a[data-line-cta] { display: block; }
html[data-line="on"][data-order="ok"] .line-invite { display: block; }
/* 商品ページ・トップ棚末尾の「新作はLINEで先に」1行。装飾しない（売り場は無彩色）。
   中のリンクは文中に置くので inline に戻す（上の a[data-line-cta]{display:block} を打ち消す） */
.pdp-line, .shelf-line { display: none; font-size: 13.5px; color: var(--muted); }
.pdp-line { margin-top: 14px; }
.shelf-line { max-width: var(--wrap); margin: 8px auto 56px; padding: 0 24px; }
html[data-line="on"] .pdp-line, html[data-line="on"] .shelf-line { display: block; }
html[data-line="on"] .pdp-line a[data-line-cta], html[data-line="on"] .shelf-line a[data-line-cta] { display: inline; color: inherit; }

/* 購入完了画面のLINE導線。押し売りにしないよう、罫線1本の控えめな置き方にする */
.line-invite { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.line-invite p { font-size: 14.5px; color: var(--muted); }
html[data-line="on"][data-order="ok"] .line-invite a {
  display: inline-block; margin-top: 16px; padding: 13px 30px;
  border: 1px solid var(--ink); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 700;
}
.line-invite a:hover { background: var(--surface-alt); }
.success-box .back {
  display: inline-block; margin-top: 30px; background: var(--ink); color: #fff;
  text-decoration: none; border-radius: var(--radius); padding: 14px 34px; font-size: 14px; font-weight: 700;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .pdp { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "gallery" "buy"; }
  .pdp-buy { position: static; }
  .find, .other, .size-wrap, .spec-wrap { grid-template-columns: 1fr; }
  .find-photo { order: -1; }
  .footer-nav { gap: 32px; }
}
@media (max-width: 620px) {
  /* 🚨 スマホの縦が長い主因は文字ではなく余白。文字は縮めず余白を詰める */
  .section { padding: 46px 20px; }
  .section-head { margin-bottom: 26px; }
  .pdp { padding: 18px 20px 44px; gap: 20px; }
  .choose-body { padding: 16px 0 0; }
  .br-pc { display: none; }
  .header-nav { gap: 14px; }
  .header-nav a { display: none; }
  .br-sp { display: none; }
  .chart-inner { padding: 22px; }
  /* 🚨 スマホのサムネ列: 続きがあることを見せる。
     56px幅にすると6枚目が途中で見切れて「まだある」と分かり、
     右端のフェードでスクロール方向も示す */
  .thumb { width: 56px; height: 56px; }
  .thumbs {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .size-table { font-size: 13px; }
  .size-table th, .size-table td { padding: 10px 4px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .spec-list > div { grid-template-columns: 72px 1fr; gap: 12px; }
}

/* スマホ用の追従購入バー。購入ボタンが画面外のときだけ出る（shop.js） */
.buybar { display: none; }
.buybar[hidden] { display: none !important; }
@media (max-width: 780px) {
  .buybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
  }
  .buybar-info { display: grid; line-height: 1.4; }
  .buybar-price { font-size: 18px; font-weight: 700; color: var(--ink); white-space: nowrap; }
  .buybar-price span { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 4px; }
  .buybar-sel { font-size: 12.5px; color: var(--muted); }
  .buybar-btn {
    flex: 1; min-height: 48px; border: none; border-radius: var(--radius);
    background: var(--ink); color: #fff; font-size: 15px; font-weight: 700;
  }
  .buybar-btn:disabled { background: #c3ccd4; }
  /* バーの高さぶん、最下部のフッターが隠れないようにする */
  body[data-page="product"] .site-footer { padding-bottom: 96px; }
}

/* 指で押せる大きさを確保する（推奨44px） */
.cart-button, .swatch, .opt, .add-button, .checkout-button, .hero-cta { min-height: 44px; }
.ci-controls button { width: 40px; height: 40px; }
.cart-close, .chart-close {
  width: 44px; height: 44px; display: grid; place-items: center;
}
.chart-close { top: 8px; right: 10px; }

/* 文中リンクのタップ領域を広げる（見た目は変えない）。
   inline要素の縦paddingは行の高さに影響しないが、押せる範囲は広がる */
.doc a, .seller a, .spec-note a, .spec-list a { padding: 8px 2px; margin: -8px -2px; }
.size-link { padding: 8px 4px; margin: -8px -4px; }

/* キーボード操作の人に、いまどこにいるかを見せる */
:where(a, button, select, [tabindex]):focus-visible {
  outline: 3px solid #ffbf47; outline-offset: 3px; border-radius: var(--radius);
}

/* 動きを減らす設定の人には、余計な変化を出さない */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
      transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ============================================== 箸置き（1点もの・/products/hashioki） */
/* 作品カード＝ギャラリー＋名前＋価格＋「カートに入れる」。色・サイズ・数量の選択は無い */
/* 🚨 2列だと1枚460px前後になり、箸置き（手のひらの物）には大きすぎた
      （2026-08-27ユーザー指摘）。3列＝300px前後にして、狭い幅で2列→1列に落とす。
      写真の枠はTシャツと同じ 4:5（.gallery-main img を継ぐ）。箸置きだけ1:1にすると
      棚に並べたときカードの高さが揃わない */
.hashi-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 48px) clamp(24px, 3vw, 36px);
}
@media (max-width: 980px) { .hashi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .hashi-grid { grid-template-columns: 1fr; } }
.hashi-card { min-width: 0; }
/* 🚨 箸置きは1作品5〜6枚で枚数がほぼ揃っている。3列にしたら Tシャツ用の
      「1行固定・横スクロール」だと列幅に収まらず、右端のサムネが切れて壊れて見えた。
      列幅を等分して必ず全部入れる（横スクロールを起こさない） */
.hashi-card .thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; overflow: visible; }
.hashi-card .thumb { width: auto; height: auto; aspect-ratio: 1 / 1; }
.hashi-name { font-size: 19px; margin-top: 16px; }
.hashi-oneoff {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: var(--muted); border: 1px solid var(--line); padding: 3px 8px;
  margin-left: 10px; vertical-align: 3px;
}
/* 接写。作りの細かさを見せる場。売り場カードではないので価格・CTAは置かない */
.hashi-macro {
  display: grid; gap: clamp(18px, 2.4vw, 28px);
  grid-template-columns: repeat(3, 1fr);
}
.hashi-macro img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block;
  background: var(--surface-alt);
}
.hashi-macro figcaption { margin-top: 10px; font-size: 14.5px; color: var(--text); }
@media (max-width: 560px) { .hashi-macro { grid-template-columns: 1fr; } }

.hashi-buy {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 12px;
}
.hashi-buy .add-button { flex: 0 0 auto; padding: 13px 26px; }
/* ------------------------------------------------- 在庫の状態表示（残り/売り切れ） */
/* 🚨 「残りわずか」ではなく実数（残り○点）を出す。在庫DBの数字がそのまま根拠になり、
      在庫が潤沢なうちは何も出ない＝煽りにならない。閾値と文言は shop.js の LOW_STOCK 1か所 */
.hashi-left {
  display: block; min-height: 20px; margin-top: 8px;
  font-size: 13.5px; color: var(--red);
}
/* 売り切れバッジ。写真の上に載せる。売り場の無彩色ルールに合わせて黒・角丸2px・影なし */
.hashi-badge {
  position: absolute; left: 12px; top: 12px; z-index: 1;
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 5px 12px; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  display: none;
}
.is-sold .hashi-badge { display: block; }
.hashi-card.is-sold .gallery-main img,
.hashi-tile.is-sold img { opacity: .45; }
/* 再入荷案内は「売り切れ」かつ「LINEのURLが設定済み」のときだけ。
   🚨 hidden の付け外しではなく CSS で決める（line.js との実行順で結果が変わるため） */
.hashi-restock { display: none; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
html[data-line="on"] .hashi-card.is-sold .hashi-restock { display: block; }
.hashi-restock a { color: inherit; }
/* 作家紹介。売り場の下に罫線の行で置く（装飾しない） */
.hashi-artist { margin-top: 18px; font-size: 14.5px; color: var(--text); }
.hashi-artist a { color: inherit; }
