/* MINORI FOODSCAPE WHOLESALE（LIFF）
   色と書体は「MINORI web guideline 0430」と、入口のページ（/shop/pages/wholesale）に合わせる
   書体：見出し・品名 = Zen Old Mincho／本文・数字 = Zen Kaku Gothic Antique */
:root {
  --text: #1F1F1F;          /* 見出し */
  --text-2: #434446;        /* 本文（入口のページと同じ） */
  --muted: #7A7C7E;
  --line: #E3E3DE;
  --primary: #13412F;       /* ボタン・ヘッダー（入口のページのボタンと同じ） */
  --green: #007832;         /* 「初回限定」などの緑（入口のページ） */
  --sage: #97B17E;          /* ガイドラインのアクセント */
  --leaf: #BDCB81;          /* ガイドライン「人気商品」の帯 */
  --leaf-soft: #F7F9F1;     /* 入口のページの淡い背景 */
  --orange: #DC9B58;        /* ガイドラインのアクセント（残りわずか） */
  --red: #D04C2E;           /* ガイドラインの注意 */
  --caution-bg: rgba(233, 175, 99, .1);
  --caution-line: rgba(233, 175, 99, .45);
  --bg: #F5F5F5;            /* 入口のページの背景 */
  --card: #FFFFFF;
  --radius: 10px;
  --bar-h: 0px;
  --mincho: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --gothic: "Zen Kaku Gothic Antique", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--gothic);
  font-size: 15px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.mockbar { background: #FFF4C2; color: #5B4A00; font-size: 12px; text-align: center; padding: 4px 8px; }

/* ヘッダー（入口のページのヘッダーと同じ深い緑に、白のロゴ） */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--primary); color: #fff;
}
.top .brand { display: block; line-height: 0; margin: 0; }
.brand img { height: 38px; width: auto; display: block; }
.shop { font-size: 12px; color: rgba(255, 255, 255, .85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; letter-spacing: .04em; }

.tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.tab { flex: 1; background: none; border: 0; padding: 11px 4px 9px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; letter-spacing: .06em; }
.tab.on { color: var(--text); border-bottom-color: var(--primary); font-weight: 700; }

main { max-width: 560px; margin: 0 auto; padding: 16px 16px 28px; }

.loading { text-align: center; padding: 64px 0; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); margin: 0 auto 12px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

h1, h2, h3, .mincho { font-family: var(--mincho); color: var(--text); font-weight: 600; letter-spacing: .04em; }
h1 { font-size: 21px; margin: 6px 0 10px; line-height: 1.5; }
h2 { font-size: 18px; margin: 28px 0 12px; line-height: 1.5; }
h2.center, h1.center { text-align: center; }
p { margin: 0 0 10px; }
.lead { color: var(--text-2); }
.small { font-size: 12px; color: var(--muted); line-height: 1.7; }
.center { text-align: center; }

.notice { background: var(--leaf-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; margin: 0 0 12px; white-space: pre-wrap; }
.warnbox { background: #FBEDE8; color: #8A2E17; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin: 8px 0 12px; }

.panel { background: var(--card); border-radius: var(--radius); padding: 18px 16px; margin: 0 0 12px; }

/* 入口（申込の前） */
.hero { background: var(--leaf-soft); margin: -16px -16px 0; padding: 28px 20px 24px; text-align: center; }
.hero .kicker { font-size: 13px; color: var(--text); letter-spacing: .08em; margin-bottom: 14px; }
.hero .logo { width: 220px; max-width: 70%; height: auto; display: block; margin: 0 auto 18px; }
.hero .catch { font-family: var(--mincho); font-size: 17px; color: var(--text); line-height: 1.9; margin-bottom: 12px; letter-spacing: .04em; }
.hero .sub { font-size: 13px; line-height: 2; color: var(--text-2); margin: 0; }

.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.points li { display: grid; grid-template-columns: 30px 1fr; gap: 4px 10px; align-items: baseline; }
.points .num { font-size: 22px; color: var(--text); line-height: 1; }
.points .pt { font-family: var(--mincho); color: var(--text); font-size: 15.5px; letter-spacing: .04em; }
.points .pd { grid-column: 2; font-size: 13px; line-height: 1.85; }

.perk { background: var(--card); border-radius: var(--radius); padding: 18px 16px; margin: 0 0 12px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; color: var(--green); border: 1px solid var(--green); border-radius: 999px; padding: 1px 10px; letter-spacing: .04em; }
.perk h3 { color: var(--green); font-size: 18px; font-weight: 700; margin: 8px 0 8px; }
.perk p { font-size: 13px; line-height: 1.9; margin: 0 0 6px; }
.perk.mini { padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.perk.mini p { margin: 0; }

.caution { background: var(--caution-bg); border: 1px solid var(--caution-line); border-radius: 8px; padding: 12px 14px; margin: 14px 0; }
.caution h3 { font-family: var(--gothic); font-size: 12.5px; font-weight: 700; margin: 0 0 6px; letter-spacing: .02em; }
.caution ul { margin: 0; padding: 0; list-style: none; }
.caution li { font-size: 12.5px; line-height: 1.8; padding-left: 1em; text-indent: -1em; }
.caution li::before { content: "・"; }

/* 申込フォーム */
.field { margin: 0 0 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.req { color: var(--red); font-size: 11px; margin-left: 6px; font-weight: 700; }
.opt { color: var(--muted); font-size: 11px; margin-left: 6px; font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #D6D6D0; border-radius: 8px; background: #fff; font-size: 16px; color: var(--text);
}
.field textarea { min-height: 80px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--sage); outline-offset: 0; border-color: var(--sage); }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.7; }

.btn {
  display: block; width: 100%; border: 0; border-radius: var(--radius); padding: 15px 16px; font-size: 16px; font-weight: 700;
  background: var(--primary); color: #fff; letter-spacing: .06em;
}
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn:disabled { opacity: .45; cursor: default; }
.btn + .btn { margin-top: 10px; }
.link { background: none; border: 0; color: var(--text); text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; font-size: 14px; }

/* 状態の画面 */
.state { text-align: center; padding: 30px 8px; }
.state .icon { width: 56px; height: 56px; border-radius: 50%; background: var(--leaf); color: var(--text); display: grid; place-items: center; margin: 0 auto 16px; font-size: 24px; }

/* カタログ（ガイドラインの商品カード：正方形の写真・枠線のタグ・明朝の品名・小さな「（税抜）」） */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 12px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid #D6D6D0; background: #fff; border-radius: 999px; padding: 5px 14px; font-size: 13px; font-family: var(--mincho); color: var(--text); letter-spacing: .04em; }
.chip.on { background: var(--leaf); border-color: var(--leaf); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 12px; }
@media (min-width: 520px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.card { display: flex; flex-direction: column; min-width: 0; }
.card.out { opacity: .55; }
.ph { aspect-ratio: 1 / 1; background: var(--leaf-soft); position: relative; overflow: hidden; border-radius: 4px; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .ini { position: absolute; inset: 0; display: grid; place-items: center; font-size: 36px; color: var(--sage); font-family: var(--mincho); }
.badge { position: absolute; left: 6px; top: 6px; font-size: 11px; padding: 1px 9px; border-radius: 999px; background: var(--orange); color: #fff; font-weight: 700; letter-spacing: .04em; }
.badge.out { background: #555; }
.cbody { padding: 8px 2px 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.tag { display: inline-block; font-size: 10.5px; line-height: 1.5; padding: 0 5px; border: 1px solid var(--text); color: var(--text); }
.tag.cool { border-color: #26415A; color: #26415A; }
.cname { font-family: var(--mincho); color: var(--text); font-size: 15px; line-height: 1.5; letter-spacing: .06em; margin-bottom: 2px; }
.cspec { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.cprod { font-size: 11px; color: var(--text-2); font-weight: 500; line-height: 1.6; }
.cnote { font-size: 11px; color: var(--muted); }
.cprice { margin-top: auto; padding-top: 6px; font-size: 16px; font-weight: 500; color: var(--text); letter-spacing: .02em; }
.cprice small { font-size: 10px; color: var(--text-2); margin-left: 3px; font-weight: 400; }

.stepper { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--primary); border-radius: 8px; margin-top: 8px; overflow: hidden; background: #fff; }
.stepper button { width: 40px; height: 36px; border: 0; background: #fff; font-size: 18px; color: var(--primary); }
.stepper button:disabled { color: #bbb; }
.stepper .q { font-weight: 700; min-width: 28px; text-align: center; color: var(--text); }
.add { margin-top: 8px; width: 100%; height: 38px; border-radius: 8px; border: 1px solid var(--primary); background: #fff; color: var(--primary); font-weight: 700; letter-spacing: .08em; }
.add:disabled { border-color: #bbb; color: #999; }

/* 下のバー */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: #fff; border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(19, 65, 47, .06);
}
.bar .inner { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.bar .sum { flex: 1; min-width: 0; }
.bar .amt { font-weight: 700; font-size: 17px; color: var(--text); }
.bar .amt small { font-weight: 400; font-size: 11px; color: var(--muted); }
.bar .ship { font-size: 11.5px; color: var(--text-2); line-height: 1.5; }
.progress { height: 5px; background: #ECECE6; border-radius: 99px; overflow: hidden; margin-top: 4px; }
.progress i { display: block; height: 100%; background: var(--sage); border-radius: 99px; }
.bar .btn { width: auto; padding: 12px 18px; font-size: 15px; white-space: nowrap; }

/* 確認 */
.dates { display: grid; gap: 8px; }
.date { display: flex; align-items: center; gap: 10px; border: 1px solid #D6D6D0; background: #fff; border-radius: var(--radius); padding: 10px 12px; }
.date input { width: 18px; height: 18px; accent-color: var(--primary); }
.date.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.date .dl { font-weight: 700; color: var(--text); }
.date .dc { font-size: 11.5px; color: var(--muted); }
.date .dt { margin-left: auto; font-size: 11px; background: var(--leaf-soft); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }

.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.lines li:last-child { border-bottom: 0; }
.lines .ln { min-width: 0; color: var(--text); }
.lines .ls { color: var(--muted); font-size: 12px; }
.lines .la { white-space: nowrap; color: var(--text); }
.totals { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; padding: 2px 0; }
.totals .why { justify-content: flex-end; font-size: 11.5px; color: var(--muted); }
.totals .grand { font-weight: 700; font-size: 17px; margin-top: 4px; color: var(--text); }
.pay { font-size: 12.5px; color: var(--text-2); background: var(--leaf-soft); border-radius: 8px; padding: 10px 12px; margin: 10px 0 0; }

/* 履歴 */
.order { background: #fff; border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.ohead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.oid { font-size: 11px; color: var(--muted); }
.ost { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--leaf-soft); }
.odate { font-weight: 700; color: var(--text); }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bar-h) + 16px + env(safe-area-inset-bottom));
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; z-index: 20; width: max-content; max-width: calc(100% - 32px); line-height: 1.5;
}
.empty { text-align: center; color: var(--muted); padding: 32px 0; }
