/* ==========================================================
   DSO 発注サイト
   モノトーン（白・グレー・墨）だけで組む、モダン・ミニマル。
   数値を変えるときは、まずこの :root を見てください。

   文字の大きさは :root の --fs-* の6段だけを使います（11 / 12 / 14 / 15 / 17 / 22px）。
   例外は入力欄の 16px（iPhone で入力時に画面が拡大されないため。PC では 14px）。
   色は使いません。強さの違いは「濃さ・太さ・面の塗り」で付けます。
   書体は端末に入っているもの（Webフォントを読み込まないので表示が速い）。
   線は「区切り」のための横線だけ。縦の線は使いません。
   ========================================================== */

:root {
  --canvas:   #E9E9E9;   /* 画面の外側（PCで見えます） */
  --paper:    #FFFFFF;   /* 画面の地 */
  --card:     #FFFFFF;   /* 浮かせたいものの地（枠線で浮かせる） */
  --tile:     #F2F2F2;   /* 画像の地・合計などの面 */
  --bar:      #EDEDED;   /* 帯の地 */
  --ink:      #121212;
  --ink-soft: #3C3C3C;
  --muted:    #757575;
  --rule:     #E3E3E3;   /* 区切りの横線。目立たせない */
  --line:     #C6C6C6;   /* 入力欄・ボタンの枠 */

  /* 注意・完了も色では言わず、濃さと太さで示す（モノトーン） */
  --error:      #121212;
  --error-pale: #E6E6E6;
  --ok:         #3C3C3C;
  --ok-pale:    #EDEDED;

  /* 「いまどこにいるか」「いまどの状態か」の印。色は使わず墨で示す */
  --accent:      #121212;
  --accent-deep: #121212;
  --accent-pale: #E6E6E6;

  /* 書体は端末に入っているものだけ。見出しも本文と同じ書体で、太さと字間で差をつける */
  --sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Kaku Gothic ProN',
          'Hiragino Sans', 'Yu Gothic Medium', 'Yu Gothic', Meiryo, sans-serif;
  --display: var(--sans);

  /* 文字の大きさ（6段） */
  --fs-label: 11px;   /* 見出しの小さな札・項目名・メニュー */
  --fs-small: 12px;   /* 補足の文章・注記 */
  --fs-body:  14px;   /* 本文・ボタン */
  --fs-title: 15px;   /* 商品名・一覧の見出し・数量 */
  --fs-head:  17px;   /* 区切りの見出し・価格・合計 */
  --fs-page:  22px;   /* 画面の見出し・番号 */
  --fs-input: 16px;

  --gutter: 20px;
  --measure: 960px;
  --tabbar: 64px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  /* 日本語の改行：句読点の前で折り返さない。はみ出しそうなときだけ単語の途中で折る */
  line-break: strict;
  overflow-wrap: anywhere;
  /* 段落の最後の行が1〜2文字だけにならないように整える（対応していない端末では、これまでどおりの折り返し） */
  text-wrap: pretty;
}
/* 見出し・名前は、行の長さをそろえて折り返す */
h1, h2, .lname, .prod .name { text-wrap: balance; }

/* 見出し・商品名は、語のまとまり（空白の位置）で折り返す */
h1, h2, .title, .name, .n, .h, .feature-h, .campaign-name {
  word-break: keep-all;
  word-break: auto-phrase;
  text-wrap: balance;
}
p, .note, .caption, .hint, .t span, .feature-p { text-wrap: pretty; word-break: auto-phrase; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--line);
}
a:hover { text-decoration-color: var(--ink); }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.tnum { font-variant-numeric: tabular-nums; }
.phrase { display: inline-block; }   /* 句のまとまりで折り返す（phrases() が付ける） */
.muted { color: var(--muted); }
.center { text-align: center; }
.error { color: var(--error); }
.ico { width: 22px; height: 22px; flex: none; }

/* ---------- 画面の枠 ---------- */

.app {
  background: var(--paper);
  min-height: 100vh;
  margin: 0 auto;
  max-width: 480px;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
}

/* ---------- ヘッダー（SP） ---------- */

.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--rule);
}
/* ロゴは高さで大きさを決める（横幅は比率どおりに自動） */
.logo { display: block; width: auto; max-width: none; }
.appbar .mark { line-height: 0; }
.appbar .mark .logo { height: 20px; }
.appbar .sub {
  font-size: var(--fs-label);
  letter-spacing: .1em;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1;
}
.appbar-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; }

/* 文字だけのボタン（ログアウトなど） */
.linkbtn {
  padding: 2px 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: var(--fs-label);
  letter-spacing: .06em;
  line-height: 1.4;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: nowrap;
}
.linkbtn:hover { color: var(--ink); text-decoration-color: var(--ink); }

.appbar .who {
  font-size: var(--fs-label);
  line-height: 1.5;
  color: var(--muted);
  text-align: right;
  word-break: keep-all;
}

/* 代理操作バー：いま誰として操作しているか */
.acting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 6px var(--gutter);
  background: var(--bar);
  font-size: var(--fs-small);
  line-height: 1.5;
  letter-spacing: .04em;
}
.acting .salon { font-family: var(--display); font-size: var(--fs-small); font-weight: 600; }
.acting a { font-size: var(--fs-small); white-space: nowrap; }

/* ---------- 見出しと余白 ---------- */

.pagehead { padding: 40px var(--gutter) 0; }
.pagehead .back { font-size: var(--fs-small); margin: 0 0 20px; }
.pagehead h1 {
  font-family: var(--display);
  font-size: var(--fs-page);
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.45;
  margin: 0;
}
.pagehead .caption {
  margin: 14px 0 0;
  font-size: var(--fs-small);
  line-height: 1.7;
  letter-spacing: .02em;
  color: var(--muted);
}
.pagehead .caption.lg { font-size: var(--fs-body); color: var(--ink-soft); }

.rule30 { width: 28px; height: 2px; background: var(--ink); margin-top: 14px; }

.sechead { padding: 48px var(--gutter) 0; }
.sechead.tight { padding-top: 40px; }
.sechead h2 {
  font-family: var(--display);
  font-size: var(--fs-head);
  font-weight: 500;
  letter-spacing: .1em;
  line-height: 1.5;
  margin: 0;
}
.sechead .rule30 { width: 20px; height: 1px; margin-top: 10px; }

.block { padding: 32px var(--gutter) 0; }
.block.tight { padding-top: 20px; }
.block.roomy { padding-top: 56px; }
.block.last { padding-bottom: 64px; }
.block.spacer { padding-top: 0; height: 88px; }   /* 下の合計バーに最後の商品が隠れないように */

.label { font-size: var(--fs-label); letter-spacing: .06em; color: var(--muted); line-height: 1.6; }
.note { font-size: var(--fs-small); line-height: 1.8; color: var(--muted); }
p.note { margin: 0; }
.listcount { margin: 0 0 12px; }

/* ---------- 札（ステータス・既定など） ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 9px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
  background: var(--tile);
  color: var(--ink-soft);
}
/* 受付 → 製作中 → 発送済 と進むほど濃くする。完了は枠だけ、キャンセルは薄い文字 */
.pill-accept  { background: #EDEDED; color: var(--ink-soft); }
.pill-make    { background: #CFCFCF; color: var(--ink); }
.pill-ship    { background: var(--ink); color: #FFFFFF; }
.pill-done    { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-soft); }
.pill-cancel  { background: #F2F2F2; color: var(--muted); }
.pill-default { background: var(--ink); color: #FFFFFF; }
.title .pill { margin-left: 6px; position: relative; top: -2px; }

/* 進み具合：受付 → 製作中 → 発送済 → 完了 を4つの点で */
.status { display: flex; flex-direction: column; gap: 6px; }
.statusline { display: flex; align-items: center; gap: 10px; }
.steps { display: flex; gap: 5px; }
.steps span { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--rule); }
.steps span.on  { background: var(--muted); }
.steps span.now { background: var(--accent); }

.count { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.count .k { font-size: var(--fs-label); color: var(--muted); margin-right: 4px; }
.count .n { font-size: var(--fs-title); font-weight: 500; }
.count .u { font-size: var(--fs-label); color: var(--muted); }

/* 小さな印（ラベル名・容器色・予約受付） */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 100%;
  padding: 1px 8px;
  border: 1px solid var(--rule);
  border-radius: 11px;   /* 1行なら丸い札。長い名前で2行になっても形が崩れないように */
  font-size: var(--fs-label);
  line-height: 1.5;
  color: var(--ink-soft);
  background: var(--paper);
  white-space: nowrap;
}
.tag-accent { border-color: var(--ink); background: #FFFFFF; color: var(--ink); white-space: normal; }
.tag .phrase { white-space: nowrap; }

/* ---------- 画像 ---------- */

.thumb {
  display: block;
  flex: none;
  width: 88px;
  aspect-ratio: 1;
  background: var(--tile);
  overflow: hidden;
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-sm { width: 64px; }
.thumb-xs { width: 44px; }

/* ---------- 一覧 ---------- */

.item {
  position: relative;
  border-top: 1px solid var(--rule);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.item.last { border-bottom: 1px solid var(--rule); }
.item .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: var(--fs-label);
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--muted);
}
.item .title {
  font-family: var(--display);
  font-size: var(--fs-title);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: .03em;
}
a.title { text-decoration: none; }
a.title:hover { text-decoration: underline; }
.item .foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px 16px;
}

/* 注文履歴の行：画像 ＋ 内容、下に操作 */
.hrow {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px 16px;
}
.hbody { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rowactions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.rowactions > * { flex: 1 1 auto; white-space: nowrap; }   /* 狭い画面では、ボタンの文字を折らずに次の行へ */
.rowactions > .btn2 { flex: 0 0 auto; }

/* 得意先コード（サロンを選ぶ画面。代理店が自分で付ける番号） */
.ccode { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.ccode .label { flex: none; }
.ccode-row { display: flex; align-items: center; gap: 8px; }
.ccode-row input {
  width: 150px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--card);
  padding: 0 12px;
  font-family: var(--sans);
  font-size: var(--fs-input);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  appearance: none;
}
.ccode-row input:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
.ccode-msg { flex-basis: 100%; font-size: var(--fs-small); line-height: 1.6; color: var(--muted); }
.ccode-msg:empty { display: none; }
.ccode-msg.is-ok { color: var(--ok); }
.ccode-msg.is-ng { color: var(--ink); font-weight: 500; }

.rowlinks { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: var(--fs-small); }
.rowdel { font-size: var(--fs-small); color: var(--muted); justify-self: start; }

/* ---------- マイページ ---------- */

.feature {
  display: grid;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--rule);
}
.feature-img { display: block; background: var(--tile); }
.feature-img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.feature-body { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.feature-h { font-family: var(--display); font-size: var(--fs-head); font-weight: 500; letter-spacing: .04em; line-height: 1.5; }
.feature-p { font-size: var(--fs-small); color: var(--muted); line-height: 1.7; }
.feature-btn { margin-top: 8px; }
.feature:hover .feature-btn { background: #000000; }

.recent {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--rule);
}
.recent-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.recent .top {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px;
  font-size: var(--fs-label); letter-spacing: .04em; color: var(--muted); line-height: 1.6;
}
.recent .title { font-family: var(--display); font-size: var(--fs-title); font-weight: 500; line-height: 1.55; letter-spacing: .03em; }
.recent .foot { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 8px 16px; }

.menu { display: flex; flex-direction: column; }
.linkrow {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
}
.menu .linkrow:first-child { border-top: 1px solid var(--rule); }
.linkrow .ico { color: var(--muted); }
.linkrow .t { display: flex; flex-direction: column; gap: 2px; }
.linkrow .t b { font-weight: 500; font-size: var(--fs-body); }
.linkrow .t span { font-size: var(--fs-small); line-height: 1.6; color: var(--muted); }
.linkrow .chev { font-size: var(--fs-head); color: var(--muted); line-height: 1; }
.linkrow:hover .ico, .linkrow:hover .chev { color: var(--ink); }

/* ---------- 商品を選ぶ ---------- */

.campaign {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--accent-pale);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.campaign-name { font-family: var(--display); font-size: var(--fs-title); letter-spacing: .04em; }

.catnav {
  display: flex;
  gap: 8px;
  margin: 20px calc(-1 * var(--gutter)) 0;
  padding: 0 var(--gutter) 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.catnav::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--fs-small);
  letter-spacing: .04em;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.catsec { scroll-margin-top: 12px; margin-top: 40px; }
/* カテゴリごとの帯（シャンプー・トリートメント…）。カテゴリの切れ目がひと目で分かるように */
.cathead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 14px var(--gutter); background: var(--bar);
}
.cathead h2 { margin: 0; font-family: var(--display); font-size: var(--fs-head); font-weight: 600; letter-spacing: .1em; line-height: 1.5; }
.catcount { font-size: var(--fs-small); color: var(--muted); white-space: nowrap; }
/* カテゴリの中の「ボトル」「詰め替え・業務用」の小見出し */
.formgroup { padding: 24px var(--gutter) 0; }
.formhead {
  display: flex; align-items: center; gap: 12px; margin: 0 0 12px;
  font-size: var(--fs-small); font-weight: 600; letter-spacing: .12em; line-height: 1.5; color: var(--ink);
}
.formhead::before { content: ""; width: 6px; height: 6px; background: var(--ink); flex: none; }
.formhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.prodlist { display: grid; }
.prod {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  /* スマホ：写真の横に名前と価格。ボトルカラー・印字かラベル・デザインの選択と数量は、横幅いっぱいに */
  grid-template-areas: "img body" "opts opts" "qty qty";
  grid-template-rows: auto auto 1fr;   /* PCで横に並んだカードの高さがそろっても、中身は上に詰め、数量だけ下にそろえる */
  column-gap: 16px;
  row-gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.prodlist .prod:first-child { border-top: 1px solid var(--rule); }
.prod > .thumb { grid-area: img; }
.prod.is-picked {
  background: var(--accent-pale);
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
}
.pbody { grid-area: body; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.popts { grid-area: opts; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.popts > :first-child { margin-top: 0; }
.tags:empty { display: none; }
.prod .name {
  font-family: var(--display);
  font-size: var(--fs-title);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .03em;
}
.pmeta { display: flex; flex-wrap: wrap; font-size: var(--fs-small); color: var(--muted); line-height: 1.6; }
.pmeta span { white-space: nowrap; }
.pmeta span:not(:last-child)::after { content: "・"; margin: 0 2px; }
.pprice { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; margin-top: 6px; }
.prod .price { font-size: var(--fs-head); font-weight: 500; letter-spacing: .01em; white-space: nowrap; }
.pprice .per { font-size: var(--fs-label); color: var(--muted); white-space: nowrap; }
.punit { font-size: var(--fs-small); color: var(--muted); }
.popts .tags { margin-top: 8px; }

/* 入数の切り替え（20本入 / 10本入）。選んでいる方を墨で塗る */
.sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.size {
  flex: 1 1 0;
  min-width: 96px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.size:hover { border-color: var(--ink); }
.size.on { border-color: var(--ink); background: var(--ink); color: #FFFFFF; }
.size-n { font-size: var(--fs-body); font-weight: 600; line-height: 1.35; white-space: nowrap; }
.size-u { font-size: var(--fs-label); line-height: 1.4; color: var(--muted); white-space: nowrap; }
.size-q { margin-top: 3px; font-size: var(--fs-label); font-weight: 600; line-height: 1.4; white-space: nowrap; }
.size.on .size-u { color: #CFCFCF; }
.size-note { margin: 5px 0 0; font-size: var(--fs-label); line-height: 1.5; color: var(--ink-soft); }
.pqty { grid-area: qty; align-self: end; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.pqty-note { margin-right: auto; font-size: var(--fs-small); line-height: 1.5; color: var(--ink); font-weight: 500; }

.wasrow { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.wasrow .was { font-size: var(--fs-small); color: var(--muted); text-decoration: line-through; }

/* ---------- 数量 ---------- */

.stepper {
  display: inline-flex;
  align-items: center;
  flex: none;
  border: 1px solid var(--line);
  background: var(--card);
}
.stepper button {
  width: 48px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-head); line-height: 1;
  background: transparent; border: 0; border-radius: 0;
  color: var(--ink); cursor: pointer; padding: 0;
}
.stepper button:hover:not(:disabled) { background: var(--tile); }
.stepper button:disabled { color: var(--line); cursor: default; }
.stepper .qty {
  min-width: 40px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-title); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stepper.is-zero .qty { color: var(--muted); font-weight: 400; }

/* ---------- カート ---------- */

.cartrow {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px 16px;
}
.cbody { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cbody .tags { margin-top: 6px; }
.cline {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.camt { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.4; }
.camt-yen { font-size: var(--fs-title); font-weight: 500; }
.camt-sub { font-size: var(--fs-small); color: var(--muted); }
.cartrow .rowdel { grid-column: 1 / -1; }

.summary { background: var(--tile); padding: 16px 20px; }
.srow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 4px 0;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.srow .tnum { font-size: var(--fs-body); color: var(--ink); }
.srow.total { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.srow.total .tnum { font-size: var(--fs-head); font-weight: 500; }

/* ---------- カートの合計バー（商品を選ぶ画面） ---------- */

.cartbar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
  margin: 0 auto;
  max-width: 480px;
  z-index: 4;
}
.cartbar:empty { display: none; }
.cartbar-in {
  background: var(--card);
  border-top: 1px solid var(--rule);
  box-shadow: 0 -6px 20px rgba(28, 27, 25, .05);
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cartbar-sum { display: flex; flex-direction: column; gap: 0; flex: 1; min-width: 0; }
.cartbar-sum .label { white-space: nowrap; }
.cb-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 12px; }
.cb-main { white-space: nowrap; font-size: var(--fs-small); }
.cb-main b { font-size: var(--fs-head); font-weight: 500; margin-right: 2px; }
.cb-sub { color: var(--muted); font-size: var(--fs-small); }
.cb-yen { font-size: var(--fs-body); font-weight: 500; white-space: nowrap; }
.cartbar .cartbar-btn {
  flex: none;
  width: auto;
  white-space: nowrap;
  padding: 0 22px;
  letter-spacing: .08em;
}

/* ---------- ボタン ---------- */

.btn, .btn2, .btn-line {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 0;
  font-size: var(--fs-body);
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
}
.btn  { background: var(--ink); color: #FFFFFF; border: 0; }
.btn:hover { background: #000000; color: #FFFFFF; }
.btn2 { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 400; }
.btn2:hover { border-color: var(--ink); }
.btn-line { background: var(--card); color: var(--ink); border: 1px solid var(--ink); }
.btn-line:hover { background: var(--ink); color: #FFFFFF; }
.btn-sm { min-height: 38px; font-size: var(--fs-small); letter-spacing: .04em; width: auto; }

/* 主要ボタンの読み込み中：寸法も塗りも変えず、下端に帯を流す */
.btn.is-busy, .btn2.is-busy { position: relative; overflow: hidden; pointer-events: none; }
.btn.is-busy::after, .btn2.is-busy::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 25%; height: 2px;
  background: currentColor;
  animation: slide 1.4s linear infinite;
}
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
@media (prefers-reduced-motion: reduce) {
  .btn.is-busy::after, .btn2.is-busy::after { animation: none; width: 100%; opacity: .4; }
}

.stack { display: flex; flex-direction: column; gap: 12px; }
.stack > div:empty { display: none; }
.stack > .note, .stack > .login-links { margin: 0; }

/* ---------- 入力 ---------- */

.fields { display: flex; flex-direction: column; gap: 24px; }
.f { display: flex; flex-direction: column; gap: 6px; }
.f input, .f select, .f textarea {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--card);
  padding: 0 14px;
  font-family: var(--sans);
  font-size: var(--fs-input);
  color: var(--ink);
  appearance: none;
  width: 100%;
}
.f input::placeholder, .f textarea::placeholder { color: #A6A6A6; }
.f textarea { height: auto; min-height: 104px; padding: 12px 14px; line-height: 1.8; resize: vertical; }
.f select {
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.f input:focus, .f select:focus, .f textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
.f input[type="date"] { appearance: none; padding-right: 10px; }
.f input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.f input[type="date"]:hover::-webkit-calendar-picker-indicator { opacity: 1; }
.f .hint { font-size: var(--fs-small); line-height: 1.7; color: var(--muted); }
.f.is-error input, .f.is-error select { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #F4F4F4; }
/* 項目名の横の補足（ご希望の納期など）。折り返すときは補足ごと次の行へ */
.label-note { display: inline-block; color: var(--ink-soft); font-weight: 500; letter-spacing: .04em; }
.fielderr { font-size: var(--fs-small); font-weight: 500; line-height: 1.7; color: var(--ink); }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-small); line-height: 1.8; }
.check input { width: 18px; height: 18px; margin-top: 4px; flex: none; accent-color: var(--ink); padding: 0; }

/* ---------- お知らせ・注意 ---------- */

.warn {
  padding: 13px 16px;
  border-top: 2px solid var(--ink);
  background: var(--error-pale);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.warn .head { font-size: var(--fs-body); font-weight: 600; line-height: 1.7; color: var(--ink); }
.warn .body { font-size: var(--fs-small); line-height: 1.8; color: var(--ink-soft); }
.warn-link { margin: 8px 0 0; font-size: var(--fs-small); }
.warn-actions { margin-top: 12px; }
.bullets { margin: 4px 0 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }

/* 小さなお知らせ（未登録の項目など）。注意（.warn）より控えめ */
.notice {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px;
  margin-top: 8px; padding: 9px 12px;
  background: var(--tile);
  font-size: var(--fs-small); line-height: 1.6; color: var(--ink-soft);
}
.notice a { white-space: nowrap; font-weight: 500; }
/* ラベルデザインの画面：ファイル名の決まり（config.js の labelFileRule） */
.labelrule { flex-direction: column; gap: 2px; margin: 0 0 12px; }
.labelrule .head { font-weight: 600; color: var(--ink); }

.infobox { padding: 14px 16px; background: var(--accent-pale); }
.infobox p { margin: 0; font-size: var(--fs-small); line-height: 1.8; color: var(--ink); }


/* ---------- 明細 ---------- */

.detail { border-top: 1px solid var(--rule); }
.detail .d {
  border-bottom: 1px solid var(--rule);
  min-height: 60px;
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.detail .d .l { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.detail .d .n { font-family: var(--display); font-size: var(--fs-body); font-weight: 500; line-height: 1.55; letter-spacing: .03em; }
.detail .d .s { font-size: var(--fs-small); line-height: 1.6; color: var(--muted); }
.detail .d .parts { display: flex; flex-wrap: wrap; }
.detail .d .parts > span { white-space: nowrap; }
.detail .d .parts > span.wrap { white-space: normal; min-width: 0; }   /* ボトルカラー・デザイン名は長いことがあるので、区切りで折り返す */
.detail .d .parts > span:not(:last-child)::after { content: "・"; margin: 0 2px; }
.detail .d .reserve { color: var(--ink); font-weight: 500; }
.detail .d .amt { font-size: var(--fs-body); font-weight: 500; white-space: nowrap; }
.detail .d .amt.small { font-size: var(--fs-small); font-weight: 400; white-space: normal; text-align: right; }
.detail .d .amt.plain { font-size: var(--fs-body); font-weight: 400; white-space: normal; text-align: right; }

.grand {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--tile);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.grand .k { font-size: var(--fs-small); color: var(--ink-soft); }
.grand .v { font-size: var(--fs-head); font-weight: 500; letter-spacing: .01em; }

.shipline {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--rule);
}
.shipdate { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--fs-body); }
.addressbox { margin: 0; padding: 16px 20px; background: var(--tile); font-size: var(--fs-body); line-height: 1.9; }

.flowrow { border-top: 1px solid var(--rule); padding: 18px 0; display: flex; gap: 14px; }
.flowrow.last { border-bottom: 1px solid var(--rule); }
.flowrow .no {
  flex: none;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--tile);
  font-size: var(--fs-label);
  font-variant-numeric: tabular-nums;
}
.flowrow .t { display: flex; flex-direction: column; gap: 4px; }
.flowrow .t b { font-size: var(--fs-body); font-weight: 500; }
.flowrow .t span { font-size: var(--fs-small); line-height: 1.8; color: var(--muted); }

/* ---------- 注文完了 ---------- */

.donebox {
  padding: 24px 20px;
  background: var(--card);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.donebox p { margin: 0; }
.done-ico { color: var(--accent); display: block; margin-bottom: 8px; }
.done-ico .ico { width: 36px; height: 36px; }
.orderno {
  font-family: var(--display);
  font-size: var(--fs-page);
  font-weight: 500;
  letter-spacing: .1em;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
}
.donesum { margin-top: 8px !important; font-size: var(--fs-body); }
.mailto { color: var(--ink); font-weight: 500; word-break: break-all; }
.donebox .note { margin-top: 12px; }

/* ---------- 空の状態 ---------- */

.empty {
  padding: 32px 20px;
  background: var(--tile);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.empty .h { font-family: var(--display); font-size: var(--fs-title); font-weight: 500; line-height: 1.6; letter-spacing: .04em; }
.empty .p { font-size: var(--fs-small); line-height: 1.8; color: var(--ink-soft); }

/* ---------- 読み込み中の骨組み ---------- */

.skel { border-top: 1px solid var(--rule); padding: 22px 0; display: flex; flex-direction: column; gap: 12px; }
.skel i { display: block; height: 8px; background: var(--tile); }
.skel i.w30 { width: 30%; } .skel i.w70 { width: 70%; } .skel i.w50 { width: 50%; }
.skel.pulse { animation: fade 1.4s ease-in-out infinite; }
@keyframes fade { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .skel.pulse { animation: none; } }

.inlinebusy { font-size: var(--fs-small); color: var(--muted); }

/* ---------- 下のメニュー（SP） ---------- */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  margin: 0 auto;
  max-width: 480px;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--rule);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 5;
}
.tabbar a {
  position: relative;
  flex: 1;
  height: var(--tabbar);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: var(--fs-label);
  letter-spacing: .02em;
  line-height: 1.2;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.tabbar a.on { color: var(--ink); font-weight: 500; }
.tabbar a.on::before {
  content: "";
  position: absolute;
  top: -1px; left: 28%; right: 28%;
  height: 2px;
  background: var(--accent);
}

/* ---------- ログイン（スクロールなしで1画面に収める） ----------
   写真が残りの高さを埋めるので、画面の高さが違っても入力欄まで必ず見えます */

/* ログイン・会員登録の画面は下のメニューがないので、その余白を空けない */
body.is-bare .app { min-height: 100vh; min-height: 100svh; padding-bottom: 0; display: flex; flex-direction: column; }

.page-login { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; padding: 0; }
/* flex-basis を 0 にして、写真は「余った高さ」だけを受け取る（写真の縦横比で伸びない） */
.login-hero { flex: 1 1 0; min-height: 92px; background: var(--tile); overflow: hidden; }
.login-hero img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.login-body {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px var(--gutter) calc(16px + env(safe-area-inset-bottom));
}
.login-brand { display: none; }   /* SP は画面の上のロゴで足りる */
.login-h1 {
  margin: 0;
  font-family: var(--display);
  font-size: var(--fs-head);
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.3;
}
.login-p { margin: -4px 0 0; font-size: var(--fs-small); line-height: 1.6; color: var(--muted); }
.login-err:empty { display: none; }
.page-login .fields { gap: 12px; }
.page-login .f { gap: 4px; }
.login-links { display: flex; flex-wrap: wrap; gap: 2px 20px; margin: 2px 0 0; font-size: var(--fs-small); }
/* 確認コードの画面 */
.login-to { font-weight: 600; color: var(--ink); word-break: break-all; }
.login-note { margin: -2px 0 0; font-size: var(--fs-label); line-height: 1.6; color: var(--muted); }
.f input.otp { font-size: var(--fs-page); letter-spacing: .4em; padding-left: 14px; }
.f input.otp::placeholder { color: #D0D0D0; }
.linkbtn:disabled { color: var(--muted); text-decoration: none; cursor: default; }


/* ---------- 会員登録 ---------- */
/* reCAPTCHA の右下のマークは出さない（代わりに、登録ボタンの下に Google の定める文言を載せる） */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-note a { color: inherit; white-space: nowrap; }

/* 流れ：いまの段階だけアクセント色の線 */
.regsteps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.regsteps li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-top: 10px;
  border-top: 2px solid var(--rule);
  font-size: var(--fs-label);
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--muted);
}
.regsteps li.on { border-top-color: var(--accent); color: var(--ink); font-weight: 500; }
.regsteps .no { font-variant-numeric: tabular-nums; }

/* 導入する商品：押しやすい大きさの選択肢 */
.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: var(--fs-body);
  cursor: pointer;
}
.choice input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ink); }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choices.is-error .choice { border-color: var(--error); }
@media (max-width: 359px) { .choices { grid-template-columns: 1fr; } }   /* 幅の狭いスマホでは1列（「トリートメント」が折れないように） */
.choices .fielderr { grid-column: 1 / -1; }

/* 同意事項 */
.stack-lg { display: flex; flex-direction: column; gap: 16px; }
.terms {
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.terms-h { margin: 0; font-size: var(--fs-body); font-weight: 500; letter-spacing: .04em; }
.terms-list {
  margin: 0;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fs-small);
  line-height: 1.8;
  color: var(--ink-soft);
}
.terms-link { margin: 0; font-size: var(--fs-small); color: var(--ink-soft); }
.terms .check { margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: var(--fs-body); font-weight: 500; }
.terms.is-error { border-color: var(--error); background: var(--error-pale); }

/* 自動送信よけの見えない欄 */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- キャンペーン（サロンの画面） ---------- */
.campaigns { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.campaigns .campaign { margin-top: 0; gap: 4px; }
.campaign-sum { margin: 0; font-size: var(--fs-small); line-height: 1.7; color: var(--ink); }
.campaign-desc { font-size: var(--fs-small); line-height: 1.7; color: var(--ink-soft); }
.campaign-left { margin-left: 8px; color: var(--ink); font-weight: 600; letter-spacing: .04em; }
.home-campaigns .campaigns { margin-top: 0; }
/* キャンペーンのカード：セットの内容・価格・特典を短く。細かな条件は「条件・詳細を見る」に畳む */
.campaigns .campaign { gap: 8px; }
.cp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.cp-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.cp-chip {
  display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border: 1px solid var(--ink); border-radius: 10px;
  background: var(--paper); color: var(--ink); font-size: var(--fs-label); font-weight: 600; letter-spacing: .06em; line-height: 1.5; white-space: nowrap;
}
.cp-chip.is-off { border-color: var(--muted); background: var(--tile); color: var(--ink-soft); }
.cp-chip.is-ok { background: var(--ink); color: #FFFFFF; }
.cp-rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 10px; font-size: var(--fs-small); line-height: 1.65; }
.cp-k { color: var(--muted); font-size: var(--fs-label); letter-spacing: .06em; line-height: 1.8; }
.cp-v { display: flex; flex-direction: column; min-width: 0; color: var(--ink); }
.cp-v b { font-size: var(--fs-title); font-weight: 600; line-height: 1.4; }
.cp-v s { color: var(--muted); }
.cp-item { display: block; }
.cp-auto { margin-left: 4px; font-size: var(--fs-label); color: var(--ink-soft); }
.cp-auto.is-line { margin-left: 0; text-wrap: balance; }
.cp-until { font-size: var(--fs-label); color: var(--muted); letter-spacing: .04em; align-self: center; }
.cp-off { margin: 0; font-size: var(--fs-small); line-height: 1.7; color: var(--ink); }
.cp-off b { font-weight: 600; }
.cp-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 4px; }
.cp-acts .btn, .cp-acts .btn2 { width: auto; padding: 0 18px; }
.cp-acts .btn[disabled] { background: var(--line); border-color: var(--line); color: #FFFFFF; cursor: not-allowed; }
.cp-more summary { cursor: pointer; font-size: var(--fs-small); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; width: fit-content; }
.cp-more summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cp-more[open] { flex-basis: 100%; order: 3; }
.cp-more:not([open]) .cp-more-body { display: none; }   /* 閉じているときは、ボタンの横の狭い幅で組まない */
.cp-pv { order: 2; }
.cp-more-body { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.cp-more-body p { margin: 0; font-size: var(--fs-small); line-height: 1.7; color: var(--ink-soft); }
.campaign.is-off { background: var(--tile); }
.campaign.is-off .campaign-name, .campaign.is-off .cp-v { color: var(--ink-soft); }
.nw { white-space: nowrap; }

/* カート・確認画面：適用されたキャンペーン */
.camp-done { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-bottom: 8px; }
.camp-done-name { font-size: var(--fs-small); font-weight: 600; color: var(--ink); }

/* キャンペーンのセットの画面 */
.setinfo { gap: 8px 10px; padding: 14px 16px; background: var(--accent-pale); }
.setprog { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0; font-size: var(--fs-body); color: var(--ink); }
.setprog b { font-size: var(--fs-small); font-weight: 600; }
.setprog:not(.is-ok) .tnum { font-weight: 600; }
.setnotes { margin: 6px 0 0; padding-left: 1.2em; font-size: var(--fs-small); line-height: 1.7; color: var(--ink-soft); }
.setline { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding: 12px 14px 14px; border: 1px solid var(--rule); background: var(--card); }
.setline-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.setline-head .thumb { width: 48px; height: 48px; }
.setline-name { display: flex; flex-direction: column; font-size: var(--fs-small); line-height: 1.6; color: var(--muted); }
.setline-name b { font-size: var(--fs-body); font-weight: 500; color: var(--ink); }
.setline-name .tag { align-self: flex-start; margin-top: 2px; }
.setline-qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: var(--fs-small); color: var(--ink-soft); }
.setline-qty b { color: var(--ink); }
.setline-qty > .tnum { text-wrap: balance; }
.setmore { margin-top: 12px; width: auto; padding: 0 16px; }
.setcheck { padding: 12px 14px; border: 1px solid var(--line); background: var(--paper); }
.setcheck-h { margin: 0 0 4px; font-size: var(--fs-small); font-weight: 600; color: var(--ink); }
.setcheck-ok { margin: 0; font-size: var(--fs-small); font-weight: 600; color: var(--ink); line-height: 1.7; }
.setissues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.setstatus { list-style: none; margin: 0 0 10px; padding: 0 0 10px; border-bottom: 1px dashed var(--line); display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-small); line-height: 1.7; color: var(--ink-soft); }
.setstatus li { text-wrap: balance; }
.setstatus li.is-ok { color: var(--ink); font-weight: 600; }
.btn.is-static { cursor: default; }
.setissues .linkbtn { text-align: left; font-size: var(--fs-small); line-height: 1.6; }

/* 商品カードの中のボトルカラー・印字かラベルか・デザインの選択と、カートに入っている分 */
.pdesign, .pcolor, .pdeco { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
/* 印字かラベルか（2つから選ぶ切り替え）。選んでいる方を墨で塗る */
.seg { display: flex; gap: 6px; }
.seg-btn {
  flex: 1 1 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 0;
  background: var(--card); color: var(--ink); font-family: inherit; font-size: var(--fs-body); font-weight: 600;
  letter-spacing: .12em; cursor: pointer;
}
.seg-btn:hover { border-color: var(--ink); }
.seg-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.seg-btn.on { border-color: var(--ink); background: var(--ink); color: #FFFFFF; }
.pdeco.is-empty .seg-btn { border-color: var(--ink); }
.pdeco-one { margin: 0; font-size: var(--fs-small); line-height: 1.7; color: var(--ink); }
/* 発売前の商品：写真と文字を灰色にする（選ぶ欄は出さず、数量のボタンは押せない） */
.prod.is-soon .thumb img { filter: grayscale(1); opacity: .45; }
.prod.is-soon .name, .prod.is-soon .pmeta, .prod.is-soon .price, .prod.is-soon .pprice .per, .prod.is-soon .punit,
.prod.is-soon .size-note { color: var(--muted); }
.prod.is-soon .size { color: var(--muted); }
.prod.is-soon .size.on { border-color: var(--muted); background: var(--muted); color: #FFFFFF; }
.prod.is-soon .pqty-note { color: var(--ink-soft); font-weight: 400; }
.tag.tag-soon { border-color: var(--muted); background: var(--tile); color: var(--ink-soft); font-weight: 600; letter-spacing: .08em; }
.pcolor-one { margin: 0; font-size: var(--fs-small); line-height: 1.7; color: var(--ink); }
/* 入力欄（.f の外にあるもの）。見た目は .f の入力欄と同じ */
.pdesign select, .pcolor select, .condqty input, .condqty select {
  height: 40px; border: 1px solid var(--line); border-radius: 0; background: var(--card);
  padding: 0 12px; font-family: var(--sans); font-size: var(--fs-input); color: var(--ink); appearance: none; width: 100%;
}
.pdesign select, .pcolor select, .condqty select {
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 17px, calc(100% - 15px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.pdesign select:focus, .pcolor select:focus, .condqty input:focus, .condqty select:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
.pdesign.is-empty select, .pcolor.is-empty select { border-color: var(--ink); color: var(--ink-soft); }
.pdesign select:disabled { border-color: var(--line); background-color: var(--tile); color: var(--muted); cursor: default; }
.pdesign-none { margin: 0; font-size: var(--fs-small); line-height: 1.7; color: var(--ink-soft); }
.pcart { list-style: none; margin: 8px 0 0; padding: 8px 10px; background: var(--tile); display: flex; flex-direction: column; gap: 2px; }
.pcart li { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-small); line-height: 1.6; color: var(--ink-soft); }
.pcart b { font-weight: 600; color: var(--ink); white-space: nowrap; }
.prod.is-picked .pcart { background: var(--paper); }

/* 見積もり（カート・確認画面） */
.srow.discount .tnum, .srow.discount span { color: var(--ink); font-weight: 500; }
.srow.muted span { color: var(--muted); font-size: var(--fs-small); }
.gifts { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.gift { font-size: var(--fs-small); line-height: 1.6; color: var(--ink); }
.gift::before { content: "＋ "; color: var(--muted); }
.qhint { flex-direction: column; align-items: flex-start; }
.qhint b { font-weight: 600; color: var(--ink); }
.camp-lines { margin-top: 0; }
.detail .d.discount .amt, .detail .d.discount .s { color: var(--ink); font-weight: 500; }
/* 長い文（プレゼント・適用したキャンペーン）は、見出しの下に全幅で出す（狭い画面で見出しが1文字ずつ折り返さないように） */
.detail .d.stack { flex-direction: column; align-items: stretch; gap: 4px; }
.detail .d.stack .amt.small { text-align: left; }

/* ---------- ラベルデザイン ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 18px 16px; border: 1px dashed var(--line); background: var(--paper);
}
.dropzone.is-over { border-color: var(--ink); background: var(--tile); }
.dropzone .btn { width: auto; padding: 0 24px; }
.pc-only { display: none; }
.uploads { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.uploads:empty { display: none; }
.uprow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px; background: var(--tile); font-size: var(--fs-small); }
.upname { overflow-wrap: anywhere; color: var(--ink); }
.upmsg { grid-column: 1 / -1; color: var(--ink-soft); line-height: 1.6; }
.upbar { grid-column: 1 / -1; height: 4px; background: #DADADA; overflow: hidden; }
.upbar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.uprow.is-done .upbar span { width: 100%; }
.uprow.is-error .upmsg { color: var(--ink); font-weight: 600; }
.uprow.is-error .upbar, .uprow.is-skip .upbar { display: none; }

.lgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.lgrid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }   /* マイページ：スマホは3列 */
.lcard { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lthumb {
  aspect-ratio: 3 / 4; width: 100%; padding: 0; border: 1px solid var(--rule); background: var(--tile);
  display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; color: var(--muted);
}
.lthumb:hover { border-color: var(--ink); color: var(--ink); }
.lthumb.is-static { cursor: default; }
.lthumb.is-static:hover { border-color: var(--rule); color: var(--muted); }
.lthumb img { width: 100%; height: 100%; object-fit: contain; background: #FFFFFF; }
.pdf-ico { width: 38%; height: auto; }
.lbody { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lname { font-size: var(--fs-small); font-weight: 500; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.lmeta { font-size: var(--fs-label); line-height: 1.5; color: var(--muted); }
.lacts { display: flex; gap: 16px; margin-top: 2px; }
.more-link { margin: 12px 0 0; font-size: var(--fs-small); }
/* マイページのデザイン：印字・ラベルに分けて並べる */
.dkind + .dkind { margin-top: 24px; }
.dkind-h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: var(--fs-small); font-weight: 600; letter-spacing: .12em; color: var(--ink); }
.dkind-h .tnum { font-weight: 400; letter-spacing: .02em; color: var(--muted); }
.empty .btn2 { align-self: flex-start; width: auto; padding: 0 20px; }

/* ---------- キャンペーンの管理（営業・管理者） ---------- */
.camprow { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.camprow .top { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: var(--fs-small); color: var(--muted); }
.camprow .note { margin: 0; }
.formh { margin: 28px 0 10px; font-size: var(--fs-body); font-weight: 600; letter-spacing: .06em; }
.radios { display: flex; flex-direction: column; gap: 6px; }
.f2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plainval { font-size: var(--fs-body); line-height: 1.7; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchips .chip { height: auto; min-height: 32px; padding: 5px 12px; white-space: normal; text-align: left; line-height: 1.5; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.condrow { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; padding: 12px; background: var(--tile); }
/* 商品の選択（開いて選ぶ） */
.ppick { border: 1px solid var(--line); background: var(--paper); }
.ppick > summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
  padding: 10px 12px; cursor: pointer; list-style: none;
}
.ppick > summary::-webkit-details-marker { display: none; }
.ppick-sum { flex: 1 1 auto; min-width: 0; font-size: var(--fs-small); line-height: 1.6; color: var(--ink); }
.ppick-open { font-size: var(--fs-label); color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.ppick[open] .ppick-open { visibility: hidden; }
.pgroups { display: flex; flex-direction: column; gap: 6px; padding: 4px 12px 12px; border-top: 1px solid var(--rule); }
.pgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-top: 6px; }
.pg-name { flex: 1 1 200px; min-width: 0; font-size: var(--fs-small); line-height: 1.5; }
.pg-skus { display: flex; gap: 6px; }
.pg-skus .chip { height: 30px; padding: 0 12px; }
.pgroups .hint { margin: 6px 0 0; font-size: var(--fs-small); color: var(--muted); }
/* 特典 */
.benefit { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); background: var(--paper); }
.benefit .fields, .benefit .f { gap: 6px; }
.ben-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ben-no { font-size: var(--fs-body); font-weight: 600; letter-spacing: .04em; }
.ben-head select { width: auto; height: 36px; padding: 0 32px 0 10px; border: 1px solid var(--line); border-radius: 0; background: var(--card); font: inherit; font-size: var(--fs-body); }
.ben-add { display: flex; flex-wrap: wrap; gap: 8px; }
.ben-add .btn2 { width: auto; padding: 0 16px; }
.pricelist { display: flex; flex-direction: column; gap: 8px; }
.price-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; font-size: var(--fs-small); line-height: 1.6; }
.price-row .muted { margin-left: 8px; }
.price-in { display: flex; align-items: center; gap: 6px; }
.price-in input { width: 110px; height: 40px; border: 1px solid var(--line); border-radius: 0; padding: 0 10px; font: inherit; font-size: var(--fs-input); }
.radios.opts { margin-top: 12px; gap: 10px; }
.condqty span { white-space: nowrap; }
.benefit .condqty select, .radios.opts .condqty input { width: auto; }
.radios.opts .condqty input { width: 96px; height: 40px; border: 1px solid var(--line); border-radius: 0; padding: 0 10px; font-size: var(--fs-input); }
.condqty { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-small); }
.condqty input { width: 96px; }
.condqty select { width: auto; }


/* ---------- PC ---------- */

.navbar, .userbar { display: none; }

@media (min-width: 1024px) {
  .pc-only { display: inline; }
  .lgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
  .lgrid.compact { grid-template-columns: repeat(4, minmax(0, 160px)); }
  .campaigns { flex-direction: row; flex-wrap: wrap; }
  .campaigns > .label { flex-basis: 100%; }
  .campaigns .campaign { flex: 1 1 320px; }
  body { background: var(--paper); }
  .app { max-width: none; padding-bottom: 0; }
  .appbar, .tabbar { display: none; }

  .cartbar { position: sticky; bottom: 0; max-width: none; }
  .cartbar-in { padding: 14px calc((100% - var(--measure)) / 2); }

  .navbar {
    display: block;
    background: var(--card);
    border-bottom: 1px solid var(--rule);
  }
  .navbar .inner {
    width: var(--measure);
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }
  .navbar .brand { display: flex; align-items: flex-end; gap: 16px; color: inherit; text-decoration: none; }
  .navbar .brand .mark { line-height: 0; }
  .navbar .brand .logo { height: 24px; }
  .navbar .brand .sub { font-size: var(--fs-label); letter-spacing: .1em; color: var(--muted); line-height: 1; }
  .navbar .nav { display: flex; align-items: center; gap: 32px; }
  .navbar .nav a {
    position: relative;
    font-size: var(--fs-body); letter-spacing: .06em;
    color: var(--muted); text-decoration: none;
    padding: 4px 0;
  }
  .navbar .nav a:hover { color: var(--ink); }
  .navbar .nav a.on { color: var(--ink); font-weight: 500; }
  .navbar .nav a.on::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
    height: 2px; background: var(--accent);
  }

  /* ログイン中の帯（メニューの上）。代理操作の帯もここにまとめるので、PC では .acting を出さない */
  .acting { display: none; }
  .userbar { display: block; background: var(--bar); }
  .userbar .inner {
    width: var(--measure);
    margin: 0 auto;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    font-size: var(--fs-label);
    line-height: 1.5;
    letter-spacing: .04em;
  }
  .ub-acting { display: flex; align-items: center; gap: 20px; }
  .ub-acting .salon { font-family: var(--display); font-size: var(--fs-small); font-weight: 600; }
  .ub-acting a { white-space: nowrap; }
  .ub-who { display: flex; align-items: center; gap: 12px; min-width: 0; margin-left: auto; }
  .ub-who .label { color: var(--muted); white-space: nowrap; }
  .ub-who .name { font-size: var(--fs-small); color: var(--ink); }
  .ub-out { margin-left: 8px; }
  .ub-who .role {
    font-size: var(--fs-label); line-height: 1; white-space: nowrap;
    color: var(--ink-soft); background: var(--card);
    padding: 5px 10px; border-radius: 999px;
  }

  .page {
    width: var(--measure);
    margin: 0 auto;
    padding: 56px 0 96px;
  }

  /* 本文は 720px 幅。商品一覧だけは画面幅いっぱいに2列で並べる */
  .pagehead, .sechead, .block { padding-left: 0; padding-right: 0; max-width: 720px; }
  .block.wide { max-width: none; }
  .pagehead { padding-top: 0; }
  .pagehead h1 { font-size: var(--fs-page); }
  .block.last { padding-bottom: 0; }
  .narrow { max-width: 480px; }

  .catnav { margin: 20px 0 0; padding: 0; flex-wrap: wrap; overflow: visible; }
  .catsec { margin-top: 48px; }
  .cathead { padding: 14px 20px; }
  .formgroup { padding: 28px 0 0; }

  .f input, .f select, .f textarea, .ccode-row input { font-size: var(--fs-body); }
  .choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .prodlist { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .prodlist .prod:nth-child(2) { border-top: 1px solid var(--rule); }
  .prod { grid-template-columns: 104px minmax(0, 1fr); grid-template-areas: "img body" "img opts" "img qty"; }
  .prod > .thumb { width: 104px; }
  .prod.is-picked { margin-inline: 0; padding-inline: 16px; }

  .feature { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .feature-img img { aspect-ratio: 4 / 3; }
  .feature-body { padding: 32px; }

  .hrow, .recent { grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; }
  .hrow .rowactions, .recent .rowactions { grid-column: auto; flex-direction: column; min-width: 180px; }
  .rowactions > .btn2 { flex: 1; }

  /* ログインは、左に写真・右に入力。画面いっぱいに1画面で収める */
  .page-login {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 0;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
  }
  .page-login .login-hero { min-height: 0; height: 100vh; height: 100svh; }
  .page-login .login-body {
    justify-content: center;
    gap: 16px;
    padding: 40px 72px;
    max-width: none;
  }
  .login-brand {
    display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
    margin-bottom: 8px;
  }
  .login-brand .logo { height: 32px; }
  .login-brand .sub { font-size: var(--fs-small); letter-spacing: .16em; color: var(--muted); line-height: 1; }
  .login-h1 { font-size: var(--fs-page); }
  .login-p { margin-top: -6px; font-size: var(--fs-body); }
  .page-login .fields { gap: 18px; }
  .page-login .f { gap: 6px; }
  .login-links { gap: 4px 24px; margin-top: 6px; font-size: var(--fs-small); }
}

.sr { position: absolute; left: -9999px; }
.sr:focus { left: 24px; top: 8px; background: var(--ink); color: #FFFFFF; padding: 8px 12px; z-index: 10; }

/* キャンペーン：一覧のボタンと、保存する前の確認 */
.rowbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rowbtns .btn2 { flex: 0 0 auto; }
.camppreview { padding: 18px 16px; border: 1px solid var(--ink); display: flex; flex-direction: column; gap: 10px; }
.camppreview .h3 { margin: 0; font-size: var(--fs-body); font-weight: 600; letter-spacing: .04em; }
.camppreview .pv-name { margin: 0; font-weight: 600; }
.camppreview .campaign-sum { margin: 0; }
.camppreview .stack { margin-top: 6px; }

/* マイページ：メールアドレス未登録・パスワード変更のおすすめ */
.acctnote { margin-top: 0; }
.acctnote + .acctnote { margin-top: 8px; }

/* hidden 属性は、display を指定した部品（.stack など）でも必ず隠す */
[hidden] { display: none !important; }
