/* ハガキDM営業ツール — デザイントークン+共通コンポーネント
   UIデザイン指示書 v1.0 準拠。
   世界観:「郵便の道具立て × 広告ダッシュボードの計器感」
   判定基準:「印刷サービスに見えたら失敗、広告ツールに見えたら成功」 */

:root {
  --ink: #1A1D29;
  --sub: #5A6072;
  --bg: #FFFFFF;
  --bg-wash: #F7F8FB;
  --line: #E3E6EE;
  --navy: #223055;
  --navy-soft: #EEF1F8;
  --shu: #D94F2B;        /* 朱=ブランドアクセント(消印の色)。使用は画面の5%以下 */
  --shu-soft: #FDF1EC;
  --ok: #1E7A4E;
  --warn: #B7791F;

  --font-display: 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif;
  --font-body: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --shadow: 0 1px 3px rgba(26, 29, 41, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* hidden属性は必ず効かせる。要素セレクタで display を指定していると
   ブラウザ既定の [hidden]{display:none} が負けて、隠したはずの要素が出てしまう
   (label{display:block} のせいで「業種を入力」欄が常時表示になっていた) */
[hidden] { display: none !important; }

html { height: 100%; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg-wash);
  min-height: 100%;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; line-height: 1.4; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
a { color: var(--navy); }
strong { font-weight: 700; }

/* 数値(計器)— このコントラストがプロダクトの顔 */
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; }
.num-hero { font-size: 28px; font-weight: 700; line-height: 1.1; }
.num-unit { font-size: 13px; font-weight: 500; color: var(--sub); margin-left: 2px; }

/* フォーカスリング(全インタラクティブ要素) */
:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---- アプリシェル(サイドナビ+トップバー) --------------------------------- */

.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--navy);
  color: #fff;
  padding: 16px 0 24px;
  display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  font-family: var(--font-display); font-weight: 900; font-size: 16px;
  color: #fff; text-decoration: none;
  padding: 8px 20px 16px; letter-spacing: .02em;
  display: flex; align-items: center; gap: 8px;
}
.sidebar .brand .postmark {
  width: 22px; height: 22px; border: 2px solid var(--shu); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.sidebar .brand .postmark::before { content: ""; width: 12px; height: 12px; border: 1px solid var(--shu); border-radius: 50%; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar .nav-label {
  font-size: 10px; letter-spacing: .14em; color: rgba(255, 255, 255, .38);
  padding: 14px 20px 4px; font-weight: 700;
}
.sidebar nav a {
  color: rgba(255, 255, 255, .82); text-decoration: none;
  padding: 9px 20px; font-size: 13px; font-weight: 500;
  border-left: 3px solid transparent;
  display: flex; align-items: center; gap: 10px;
}
.sidebar nav a .ic { display: inline-flex; width: 16px; height: 16px; flex: none; opacity: .75; }
.sidebar nav a .ic svg { width: 16px; height: 16px; }
.sidebar nav a.active .ic { opacity: 1; color: var(--shu); }
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar nav a.active {
  border-left-color: var(--shu);
  background: rgba(255, 255, 255, .08);
  color: #fff; font-weight: 700;
}
.sidebar .nav-sep { border-top: 1px solid rgba(255, 255, 255, .12); margin: 10px 20px; }
.sidebar .foot { margin-top: auto; padding: 12px 20px 0; font-size: 11px; color: rgba(255,255,255,.4); }

.acct { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #6B7186; }
.acct .acct-user {
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.linkbtn {
  background: none; border: 0; padding: 0; font: inherit; color: var(--navy);
  text-decoration: underline; cursor: pointer; white-space: nowrap;
}
.linkbtn:hover { color: var(--shu); }

.content { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  height: 52px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 30;
}
.topbar .page-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.topbar .spacer { flex: 1; }

/* 締切カウンター(常設・このSaaS固有のUI) */
.deadline-counter {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--sub);
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg);
  white-space: nowrap;
}
.deadline-counter .num { font-size: 13px; color: var(--ink); }
.deadline-counter.warn { border-color: var(--warn); color: var(--warn); }
.deadline-counter.warn .num { color: var(--warn); }
.deadline-counter.urgent { border-color: var(--shu); color: var(--shu); background: var(--shu-soft); }
.deadline-counter.urgent .num { color: var(--shu); }

main.page { max-width: 1200px; width: 100%; margin: 0 auto; padding: 24px; flex: 1; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin-right: auto; }

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

button, .btn {
  cursor: pointer; border: 0; border-radius: 6px;
  padding: 10px 20px; font-size: 14px; font-weight: 700;
  font-family: var(--font-body);
  background: var(--shu); color: #fff;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: filter .2s ease;
  line-height: 1.5;
}
button:hover, .btn:hover { filter: brightness(.92); }
button.secondary, .btn.secondary { background: var(--bg); color: var(--navy); border: 1px solid var(--line); }
button.ghost, .btn.ghost { background: transparent; color: var(--sub); border: 0; font-weight: 500; }
button.small, .btn.small { padding: 5px 12px; font-size: 12px; }
button:disabled { opacity: .45; cursor: default; }
.btnrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---- カード・数値カード ------------------------------------------------------- */

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card > h2 { margin-bottom: 8px; }
.cardgrid { display: grid; gap: 12px; margin-bottom: 16px; }
.cardgrid.cols4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.statcard {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 16px; box-shadow: var(--shadow);
  position: relative;
}
.statcard .ico, .card .ico {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy-soft); color: var(--navy);
}
.statcard .ico svg, .card .ico svg { width: 17px; height: 17px; }
.ico.shu { background: var(--shu-soft); color: var(--shu); }
.ico.ok { background: #E7F3EC; color: var(--ok); }
.ico.warn { background: #FBF3E2; color: var(--warn); }
.statcard .label { font-size: 12px; color: var(--sub); margin-bottom: 4px; }
.statcard .value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 700; line-height: 1.2; }
.statcard .value .unit { font-size: 13px; font-weight: 500; color: var(--sub); }
.statcard .delta { font-size: 12px; margin-top: 2px; }
.statcard .delta.up { color: var(--ok); }
.statcard .delta.down { color: var(--shu); }

/* 消印スタンプ(シグネチャ・各画面1個まで) */
.stamp {
  width: 116px; height: 116px; border-radius: 50%;
  border: 2.5px solid var(--shu);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--shu); position: relative; flex: none;
  background: var(--bg);
}
.stamp::before {
  content: ""; position: absolute; inset: 5px;
  border: 1px solid var(--shu); border-radius: 50%; opacity: .55;
}
.stamp .stamp-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.stamp .stamp-value { font-family: var(--font-mono); font-size: 27px; font-weight: 700; line-height: 1.1; }
.stamp .stamp-value .unit { font-size: 13px; font-weight: 500; }
.stamp .stamp-date { font-family: var(--font-mono); font-size: 9px; opacity: .8; }
.stamp.pop { animation: stamp-pop .4s ease; }
@keyframes stamp-pop {
  0% { transform: scale(1.6) rotate(-8deg); opacity: 0; }
  60% { transform: scale(.96) rotate(1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

/* ---- テーブル ---------------------------------------------------------------- */

table { width: 100%; border-collapse: collapse; background: var(--bg); font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; font-weight: 700; color: var(--sub); background: var(--bg-wash); white-space: nowrap; }
td.r, th.r { text-align: right; }
td.num, td .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
tr.excluded td { opacity: .42; }
tr.scanned td:first-child { box-shadow: inset 3px 0 0 var(--shu); }
tr.unscanned td { color: var(--sub); }
.tablewrap { overflow-x: auto; }

/* ---- バッジ・チップ ----------------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.badge.gray { background: var(--bg-wash); color: var(--sub); }
.badge.navy { background: var(--navy-soft); color: var(--navy); }
.badge.warn { background: #FBF3E2; color: var(--warn); }
.badge.ok   { background: #E7F3EC; color: var(--ok); }
.badge.shu  { background: var(--shu-soft); color: var(--shu); }
.badge.plain::before { display: none; }

.chip {
  display: inline-flex; align-items: center;
  padding: 4px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg);
  font-size: 12px; font-weight: 500; color: var(--sub); cursor: pointer;
}
.chip.active { background: var(--navy-soft); color: var(--navy); border-color: var(--navy); font-weight: 700; }
.chiprow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---- フォーム ---------------------------------------------------------------- */

label { display: block; font-size: 12px; color: var(--sub); margin-top: 10px; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 14px; font-family: var(--font-body); background: var(--bg); color: var(--ink);
  margin-top: 3px;
}
input[type="color"] { padding: 2px; height: 36px; }
input[type="checkbox"], input[type="radio"] { width: auto; margin: 0; }
textarea { line-height: 1.6; }
.formrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; }
.help { font-size: 12px; color: var(--sub); }

/* 郵便番号枠モチーフ(繊細に・1画面1箇所まで) */
.yubin-rule {
  display: flex; gap: 4px; align-items: center; margin: 4px 0 12px;
}
.yubin-rule i { width: 14px; height: 18px; border: 1.5px solid var(--shu); opacity: .35; border-radius: 2px; }
.yubin-rule i:nth-child(4) { margin-left: 6px; }

/* ---- ステッパー(キャンペーン作成5歩) ----------------------------------------- */

.stepper { display: flex; gap: 0; margin-bottom: 20px; overflow-x: auto; }
.stepper .step {
  flex: 1; min-width: 110px;
  padding: 10px 8px 8px;
  border-bottom: 3px solid var(--line);
  color: var(--sub); font-size: 12px; font-weight: 500;
  cursor: pointer; text-align: center; background: none; border-radius: 0;
  display: block;
}
.stepper .step:hover { filter: none; background: var(--navy-soft); }
.stepper .step .n { font-family: var(--font-mono); font-weight: 700; margin-right: 4px; }
.stepper .step.active { border-bottom-color: var(--shu); color: var(--ink); font-weight: 700; }
.stepper .step.done { color: var(--ok); }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 20px; gap: 12px; }

/* ---- 状態・フィードバック ----------------------------------------------------- */

.empty {
  text-align: center; padding: 48px 24px; color: var(--sub);
}
.empty h2 { color: var(--ink); margin-bottom: 6px; }
.empty p { margin-bottom: 16px; }

.skeleton { border-radius: 6px; background: var(--line); animation: pulse 1.2s ease-in-out infinite; min-height: 16px; }
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: .9; } }

.toast-holder { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg); border: 1px solid var(--ok); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(26,29,41,.14);
  padding: 12px 16px; font-size: 13px; max-width: 340px;
  animation: toast-in .2s ease;
}
.toast.error { border-color: var(--shu); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-back {
  position: fixed; inset: 0; background: rgba(26,29,41,.4); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--bg); border-radius: 8px; width: 480px; max-width: 100%;
  max-height: 90vh; overflow: auto;
  padding: 24px; box-shadow: 0 8px 32px rgba(26,29,41,.2);
}
.modal h2 { margin-bottom: 10px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.joblog {
  background: #14161d; color: #c9d4c9;
  font-family: var(--font-mono); font-size: 12px;
  padding: 12px; border-radius: 6px; white-space: pre-wrap;
  max-height: 220px; overflow: auto; margin-top: 10px;
}
.progress {
  height: 6px; background: var(--bg-wash); border-radius: 999px; overflow: hidden;
  margin-top: 10px; border: 1px solid var(--line);
}
.progress > span { display: block; height: 100%; background: var(--shu); border-radius: 999px; width: 0; transition: width .4s ease; }

.spinner {
  width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--shu);
  border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.muted { color: var(--sub); font-size: 12px; }

/* ---- ダッシュボード(2カラム+やること+フィード+ガイド) ----------------------- */

.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1023px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-grid .card { margin-bottom: 16px; }

/* やること(タスク行) */
.todo-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: 8px;
  text-decoration: none; color: var(--ink); font-size: 13px;
  transition: border-color .2s ease, background .2s ease;
}
.todo-row:hover { border-color: var(--navy); background: var(--navy-soft); }
.todo-row .count { font-family: var(--font-mono); font-weight: 700; font-size: 16px; color: var(--shu); min-width: 34px; text-align: right; }
.todo-row .count.ok { color: var(--ok); }
.todo-row .body { flex: 1; line-height: 1.5; }
.todo-row .body small { display: block; color: var(--sub); font-size: 11px; }
.todo-row .chev { color: var(--sub); flex: none; }
.todo-empty { display: flex; align-items: center; gap: 8px; color: var(--ok); font-size: 13px; padding: 10px 2px; }

/* 最近の反応フィード */
.feed-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; align-items: baseline; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .when { font-family: var(--font-mono); color: var(--sub); font-size: 11px; white-space: nowrap; }
.feed-item .what { flex: 1; min-width: 0; }
.feed-item .what strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item .what span { color: var(--sub); font-size: 11px; }

/* 次の便ヒーロー(サイドカード) */
.ship-hero { background: var(--navy); color: #fff; border: 0; }
.ship-hero .label { font-size: 11px; opacity: .75; letter-spacing: .08em; }
.ship-hero .slot { font-family: var(--font-display); font-weight: 900; font-size: 22px; margin: 2px 0 0; }
.ship-hero .countdown { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 14px; margin: 2px 0 12px; }
.ship-hero .countdown.urgent { color: #FFB199; }

/* はじめてガイド(4歩) */
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.guide a {
  display: block; border: 1px solid var(--line); border-radius: 8px; padding: 12px;
  text-decoration: none; color: var(--ink); font-size: 12.5px; background: var(--bg);
  transition: border-color .2s ease;
}
.guide a:hover { border-color: var(--shu); }
.guide .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--shu); color: var(--shu);
  font-family: var(--font-mono); font-weight: 700; font-size: 11px; margin-bottom: 6px;
}
.guide a.done { opacity: .65; }
.guide a.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.guide h3 { font-size: 13px; margin-bottom: 2px; }
.guide p { color: var(--sub); font-size: 11.5px; line-height: 1.5; }

/* ---- グラフ(依存なし・SVG/CSS) ---------------------------------------------- */

.linechart { width: 100%; height: 180px; }
.linechart .axis { stroke: var(--line); stroke-width: 1; }
.linechart .series { fill: none; stroke: var(--shu); stroke-width: 2; }
.linechart .dot { fill: var(--shu); }
.linechart text { font-family: var(--font-mono); font-size: 10px; fill: var(--sub); }
.hbar { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 12px; }
.hbar .name { width: 160px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { flex: 1; background: var(--bg-wash); border-radius: 3px; height: 14px; overflow: hidden; }
.hbar .fill { display: block; height: 100%; background: var(--navy); border-radius: 3px; }
.hbar.accent .fill { background: var(--shu); }
.hbar .val { font-family: var(--font-mono); width: 52px; text-align: right; }

/* ---- デモカード等の既存部品 --------------------------------------------------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.democard { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.democard img { width: 100%; height: 240px; object-fit: cover; object-position: top; background: var(--bg-wash); display: block; }
.democard .body { padding: 12px; }
.democard .name { font-weight: 700; font-size: 13px; }
.democard .row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.democard textarea { font-size: 12px; margin-top: 8px; min-height: 76px; }

/* ハガキデザインのギャラリー(プレビューを見ながら選択) */
.tpl-gallery { display: grid; grid-template-columns: repeat(auto-fill, 172px); gap: 12px; margin-top: 12px; }
.tpl-card {
  border: 2px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer;
  background: var(--bg); transition: border-color .2s ease;
}
.tpl-card:hover { border-color: var(--navy); }
.tpl-card.selected { border-color: var(--shu); }
.tpl-card .thumb { width: 168px; height: 240px; overflow: hidden; background: #666; position: relative; }
.tpl-card .thumb iframe { width: 442px; height: 632px; border: 0; transform: scale(.38); transform-origin: top left; pointer-events: none; }
.tpl-card.selected .thumb::after {
  content: "選択中"; position: absolute; top: 6px; right: 6px;
  background: var(--shu); color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
}
.tpl-card .tbody { padding: 8px 10px 10px; }
.tpl-card .tbody strong { font-size: 12.5px; display: block; }
.tpl-card .tbody small { color: var(--sub); font-size: 10.5px; line-height: 1.5; display: block; margin-top: 2px; }

/* 選択カード(商材設定・便選択) */
.choicecard {
  display: block; border: 1px solid var(--line); border-radius: 8px;
  padding: 18px; background: var(--bg); cursor: pointer;
  transition: border-color .2s ease;
}
.choicecard:hover { border-color: var(--navy); }
.choicecard.selected { border-color: var(--shu); background: var(--shu-soft); }
.choicecard h3 { margin-bottom: 4px; }
.choicecard p { font-size: 12px; color: var(--sub); }

/* ---- イラスト(線画・説明用) --------------------------------------------------- */

.illust { display: inline-block; color: var(--navy); flex: none; }
.illust svg { width: 100%; height: 100%; }

/* イラスト付きの選択カード(左に絵・右に説明) */
.choicecard.with-illust { display: flex; gap: 18px; align-items: flex-start; }
.choicecard.with-illust > .illust { margin-top: 2px; }
.choicecard.with-illust .body { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .choicecard.with-illust { flex-direction: column; gap: 10px; }
}

/* 空の状態: イラスト+見出し+CTA */
.empty .illust { color: var(--line); margin-bottom: 10px; }

/* 商材ピッカー(キャンペーン新規作成の1歩目) */
.prodpick { display: grid; gap: 10px; max-height: 46vh; overflow: auto; margin-top: 4px; }
.prodpick button {
  display: flex; gap: 14px; align-items: center; text-align: left; width: 100%;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; font-weight: 400; box-shadow: none;
}
.prodpick button:hover { border-color: var(--navy); filter: none; background: var(--navy-soft); }
.prodpick .nm { font-weight: 700; font-size: 14px; }
.prodpick .sm { font-size: 12px; color: var(--sub); display: block; margin-top: 2px; }
.prodpick .chev { margin-left: auto; color: var(--sub); font-size: 18px; }

/* 選択済み商材のチップ(2歩目の見出し) */
.pickedchip {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--shu-soft); border: 1px solid var(--shu); border-radius: 8px; margin-bottom: 16px;
}
.pickedchip .nm { font-weight: 700; font-size: 14px; }
.pickedchip .linkbtn { margin-left: auto; }

/* ---- レスポンシブ(アプリは1024px以上推奨・スマホは閲覧のみ保証) --------------- */

@media (max-width: 1023px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 0 8px; }
  .sidebar .brand { padding: 12px; white-space: nowrap; flex: none; }
  .topbar { padding: 0 16px; }
  .topbar .page-title { display: none; }
  .sidebar nav { flex-direction: row; }
  .sidebar nav a { border-left: 0; border-bottom: 3px solid transparent; padding: 12px 10px; white-space: nowrap; }
  .sidebar nav a.active { border-bottom-color: var(--shu); }
  .sidebar .nav-sep, .sidebar .nav-label, .sidebar .foot { display: none; }
  .acct .acct-user { display: none; }
  .deadline-counter .label-long { display: none; }
  main.page { padding: 16px; }
}
