* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: #1f2430; background: #f4f6fa;
}
header {
  background: linear-gradient(105deg, #f8b6cd, #fcd9e4); color: #a61e5d; padding: 22px 24px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
header h1 { font-size: 22px; margin: 0; font-weight: 700; white-space: nowrap; color: #a61e5d; }
.badge { font-size: 11px; background: #ffffff66; color: #a61e5d; padding: 2px 8px; border-radius: 10px; vertical-align: middle; }
.roles { display: flex; gap: 8px; }
.role {
  background: #ffffff8c; color: #b03060; border: none; padding: 12px 20px;
  border-radius: 9px; cursor: pointer; font-size: 15px; font-weight: 600;
  text-decoration: none; display: inline-block; text-align: center;   /* <a> でもボタン見た目を維持 */
}
a.role:visited { color: #b03060; }
.role.active { background: #fff; color: #a61e5d; font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
/* スマホ用のメニューボタン。広い画面では出さない（タブはそのまま横に並ぶ）。
   2026-09-22 くみ「スマホで見た時ヘッダーヤバいからハンバーガーとかにならんかな」 */
.nav-btn { display: none; }

.stats { display: flex; gap: 14px; padding: 16px 20px 4px; flex-wrap: wrap; }
.stat {
  background: #fff; border: 1px solid #e3e8f0; border-radius: 10px;
  padding: 14px 22px; min-width: 130px;
  /* 項目名(.l)を常に上、値を下に統一（DOMでは値が先・ラベルが後でもラベルが上に来る） */
  display: flex; flex-direction: column-reverse; justify-content: flex-end; align-items: flex-start;
}
.stat .n { font-size: 22px; font-weight: 700; color: #1f2a44; line-height: 1.1; }
.stat .l { font-size: 12px; color: #6b7280; margin-bottom: 8px; white-space: nowrap; }
.stat.csv { border-color: #e64980; }
.stat.csv .n { color: #e64980; }
/* 当月仕入れを強調 */
.stat.hl { border-color: #c2255c; background: #fde7f0; }
.stat.hl .n { color: #c2255c; }
/* 対象月セレクタを大きく */
.stat-ym { min-width: 150px; }
.ym-select { font-size: 22px; font-weight: 800; border: none; background: transparent; color: #a61e5d; cursor: pointer; padding: 0; }
.stat.advice { min-width: 260px; max-width: 360px; background: #fff7e6; border-color: #ffd8a8; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; }
.advice-txt { font-size: 12px; font-weight: 600; color: #d9480f; line-height: 1.5; }
/* Webマニュアル */
.manual { max-width: 860px; margin: 0 auto; padding: 8px 4px 60px; }
.manual-h { font-size: 22px; color: #1f2a44; margin: 8px 0 6px; }
.manual-lead { color: #555; font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.man-sec { background: #fff; border: 1px solid #e3e8f0; border-radius: 12px; padding: 0 18px; margin-bottom: 10px; }
.man-sec > summary { cursor: pointer; font-weight: 700; font-size: 16px; color: #1f2a44; padding: 14px 4px; list-style: none; user-select: none; }
.man-sec > summary::-webkit-details-marker { display: none; }
.man-sec > summary::before { content: "▶"; font-size: 11px; color: #c2255c; margin-right: 8px; }
.man-sec[open] > summary::before { content: "▼"; }
.man-sec[open] { padding-bottom: 14px; }
.man-sec ul, .man-sec ol { margin: 4px 0; padding-left: 22px; line-height: 1.9; font-size: 14px; color: #333; }
.man-sec p { line-height: 1.8; font-size: 14px; color: #333; }
.man-sec b { color: #c2255c; }
.man-table { border-collapse: collapse; width: 100%; font-size: 13px; margin-top: 6px; table-layout: auto; }
.man-table th, .man-table td { border: 1px solid #e6eaf1; padding: 6px 10px; text-align: left; white-space: normal; overflow: visible; text-overflow: clip; vertical-align: top; line-height: 1.6; word-break: break-word; }
.man-table th { background: #fde7f0; color: #555; }
.man-table td b { color: #c2255c; }
.auto-hint { color: #adb5bd; font-style: italic; }
.cost-breakdown { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: #888; }
.cost-breakdown input { width: 92px; padding: 8px 10px; border: 1px solid #f3b9d2; border-radius: 8px; font-size: 14px; }
.cost-breakdown b { font-size: 16px; color: #c2255c; }
.funnel-total { font-size: 14px; color: #495057; margin: 2px 0 10px; padding-bottom: 8px; border-bottom: 1px dashed #f0d6e0; }
.funnel-total b { font-size: 20px; color: #c2255c; }
/* 👤 ダッシュボードを誰の分で見るか（担当者しぼり込み） */
.dash-person-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e3e8f0; border-radius: 10px;
  padding: 8px 14px; margin: 0 0 12px;
}
.dash-person-who { font-size: 13px; font-weight: 800; color: #1f2a44; }
.dash-person-bar select {
  padding: 5px 10px; border: 1px solid #f3b9d2; border-radius: 8px;
  font-size: 13px; font-weight: 700; color: #c2255c; background: #fff;
}
.dash-person-note { font-size: 12px; color: #868e96; }
/* 売上は人でしぼらないので、そう書いておく（自分の売上と間違えないように） */
.dash-whole {
  margin-left: 8px; font-size: 11px; font-weight: 700; color: #868e96;
  background: #f1f3f5; border-radius: 10px; padding: 1px 8px;
}
/* ダッシュボードのカードは高さをそろえる。中身の量で段ごとに高さが変わると
   ガタガタして読みにくいため。はみ出した分はカードの中でスクロールする。
   2026-09-17 くみ「枠の高さ固定されてると良いな」
   全幅の「仕入れ強化おすすめ」は表が入って高さが違うので、そちらは今までどおり。 */
.dash-grid > .dash-card:not(.dash-restock) { height: 420px; overflow-y: auto; }
/* 下に送っても見出しが消えないように上に貼り付ける
   （中身が増えて溢れると、見出しだけ上に流れて「タイトルが消えた」ように見えるため） */
.dash-grid > .dash-card:not(.dash-restock) h3 {
  /* top は下のマイナスmarginと同じだけずらす（貼り付いた時にカードの内側の余白を
     ちょうど埋めて、見出しの上に中身が透けないようにするため） */
  position: sticky; top: -16px; z-index: 1; background: #fff;
  border-radius: 12px 12px 0 0; border-bottom: 1px solid #f1f3f5;
  margin: -16px -18px 10px; padding: 16px 18px 8px;
}
.up-buyer { font-size: 14px; font-weight: 800; color: #a61e5d; margin: 12px 0 4px; padding-bottom: 3px; border-bottom: 2px solid #f7c6da; }
.up-buyer:first-child { margin-top: 2px; }
.up-dgroup { margin: 4px 0 6px 4px; }
.up-dhead { font-size: 13px; font-weight: 800; color: #c2255c; background: #fff0f6; border-radius: 6px; padding: 2px 8px; display: inline-block; margin-bottom: 2px; }
.up-count { font-size: 12px; font-weight: 700; color: #c2255c; background: #ffe3ee; border-radius: 10px; padding: 1px 8px; margin-left: 6px; }
.dash-restock { grid-column: 1 / -1; min-width: 0; }   /* 仕入れ強化テーブルは全幅（列が多いので）。min-width:0で横スクロール化 */
.rs-table-wrap { overflow: auto; max-height: 540px; }   /* 縦スクロール＋ヘッダ固定 */
.rs-table { width: 100%; min-width: 1100px; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.rs-table thead th { position: sticky; top: 0; z-index: 2; background: #eef2f8; }
.rs-table th { font-size: 11px; color: #868e96; font-weight: 700; text-align: center; padding: 6px; border-bottom: 2px solid #dde3ec; white-space: nowrap; }
/* 列幅：数値列は詰めて、商品名・リンク・AI分析を広く取る */
.rs-table th:nth-child(1)  { width: 48px; }   /* 画像 */
.rs-table th:nth-child(2)  { width: 118px; }  /* ASIN */
.rs-table th:nth-child(3)  { width: 300px; }  /* 商品名（広め） */
.rs-table th:nth-child(4)  { width: 130px; }  /* 型番 */
.rs-table th:nth-child(5)  { width: 64px; }   /* 販売数 */
.rs-table th:nth-child(6)  { width: 78px; }   /* 平均利益 */
.rs-table th:nth-child(7)  { width: 58px; }   /* 利益率 */
.rs-table th:nth-child(8)  { width: 78px; }   /* 仕入れ基準 */
.rs-table th:nth-child(9)  { width: 84px; }   /* 中古最安 */
.rs-table th:nth-child(10) { width: 60px; }   /* 在庫 */
.rs-table th:nth-child(11) { width: 130px; }  /* リンク */
.rs-table th:last-child    { width: 260px; }  /* AI分析（広め） */
.rs-table th span { font-weight: 400; }
.rs-table td { padding: 6px; border-bottom: 1px solid #f1f3f5; vertical-align: middle; }
.rs-table .rs-c { text-align: center; white-space: nowrap; }
.rs-table .rs-c b { color: #0b7a43; }
.rs-name span { white-space: normal; word-break: break-word; line-height: 1.4; }
.rs-model { font-size: 12px; color: #495057; white-space: normal; word-break: break-word; line-height: 1.4; }
.rs-img { width: 38px; height: 38px; object-fit: contain; border-radius: 4px; background: #f8f9fa; display: block; margin: 0 auto; }
.rs-links { white-space: normal; line-height: 1.8; }
.rs-links a.single-link { margin-right: 4px; display: inline-block; }
.rs-advice { font-size: 11px; color: #5c3a1e; line-height: 1.45; white-space: normal; word-break: break-word; background: #fffaf2; }
.rs-asin { font-size: 12px; color: #495057; white-space: nowrap; }
.rs-rate b, .rs-table .rs-rate { color: #0b7a43; font-weight: 700; }
.rs-table .rs-low { color: #c2255c; font-weight: 700; }
.rs-table .rs-warn { color: #e8590c; }
.rs-low-row { background: #fff5f7; }
.rs-note { font-size: 11px; color: #868e96; margin-top: 6px; }
.up-row { display: flex; align-items: center; gap: 10px; padding: 5px 2px 5px 8px; border-bottom: 1px solid #f3eef2; }
.up-img { width: 40px; height: 40px; object-fit: contain; border: 1px solid #eee; border-radius: 6px; background: #fff; flex: 0 0 40px; }
.up-noimg { display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 12px; }
.up-info { min-width: 0; flex: 1; }
.up-name { font-size: 12px; color: #333; line-height: 1.4; white-space: normal; word-break: break-word; }
.up-sku { font-size: 11px; color: #888; }
.up-empty { color: #888; font-size: 13px; padding: 10px 2px; }
/* ユーザー表示＋ログアウト */
.userbox { margin-left: auto; display: flex; align-items: center; gap: 8px; }
#userName { font-size: 13px; color: #a61e5d; font-weight: 700; }
.logout-btn { font-size: 12px; padding: 5px 12px; border: 1px solid #f3b9d2; background: #fff; color: #c2255c; border-radius: 16px; cursor: pointer; }
.logout-btn:hover { background: #fde7f0; }
/* ログイン画面 */
#loginOverlay { position: fixed; inset: 0; z-index: 9999; background: linear-gradient(135deg,#fce4ec,#f8bbd0); display: flex; align-items: center; justify-content: center; }
.login-box { background: #fff; padding: 32px 28px; border-radius: 16px; box-shadow: 0 10px 40px rgba(166,30,93,.2); width: 320px; max-width: 90vw; display: flex; flex-direction: column; gap: 12px; }
.login-box h2 { margin: 0; color: #a61e5d; font-size: 22px; text-align: center; }
.login-sub { margin: 0 0 8px; text-align: center; color: #888; font-size: 13px; }
.login-box input { padding: 11px 14px; border: 1px solid #f3b9d2; border-radius: 10px; font-size: 15px; }
.login-box input:focus { outline: none; border-color: #c2255c; }
.login-submit { padding: 12px; background: linear-gradient(105deg,#f8b6cd,#fcd9e4); color: #a61e5d; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; }
.login-submit:hover { filter: brightness(0.97); }
.login-err { color: #c92a2a; font-size: 13px; min-height: 16px; text-align: center; }
.dash-advice { background: #fff7e6; border: 1px solid #ffd8a8; border-radius: 10px; padding: 12px 16px; font-size: 14px; font-weight: 600; color: #d9480f; margin: 4px 0 14px; line-height: 1.6; }
.sku-copy, .cell-copy { margin-left: 4px; padding: 0 5px; font-size: 11px; line-height: 1.4; border: 1px solid #f3b9d2; background: #fff; color: #c2255c; border-radius: 4px; cursor: pointer; vertical-align: middle; }
.sku-copy:hover, .cell-copy:hover { background: #fde7f0; }
.ship-banners { flex: 1 1 300px; min-width: 240px; display: flex; flex-direction: column; gap: 5px; }
.ship-bulk-bar { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; padding: 8px 14px; background: #fff7fa; border: 1px dashed #f3b9d2; border-radius: 10px; flex-wrap: wrap; font-size: 13px; }
.ship-bulk-all { display: flex; align-items: center; gap: 5px; font-weight: 700; color: #495057; cursor: pointer; }
.ship-bulk-all input { width: 15px; height: 15px; accent-color: #c2255c; cursor: pointer; }
.ship-sel-count { font-weight: 700; color: #a61e5d; white-space: nowrap; padding: 0 6px; border-left: 1px solid #f3b9d2; border-right: 1px solid #f3b9d2; }
.ship-bulk-sel { padding: 6px 10px; border: 1px solid #f7c6da; border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; }
.ship-bulk-date { padding: 6px 8px; border: 1px solid #f7c6da; border-radius: 8px; background: #fff; font-size: 13px; }
.ship-bulk-btn { padding: 8px 16px; background: #c2255c; color: #fff; border: none; border-radius: 8px; cursor: pointer; font-weight: 800; font-size: 13px; }
.ship-bulk-btn:hover { background: #a61e5d; }
.ship-bulk-btn:disabled { background: #adb5bd; cursor: not-allowed; }
.ship-bulk-clear { padding: 6px 10px; background: #fff; color: #868e96; border: 1px solid #dee2e6; border-radius: 8px; cursor: pointer; font-size: 12px; }
.ship-rowcheck { width: 18px; height: 18px; accent-color: #c2255c; cursor: pointer; }
.ship-reminder { background: #e7f5ff; border: 1px solid #a5d8ff; border-radius: 8px; padding: 7px 12px; font-size: 12px; color: #1864ab; font-weight: 600; line-height: 1.5; }
.ship-reminder b { color: #d6336c; }
.ship-alert { background: #fff0f0; border: 1px solid #ffc9c9; border-radius: 8px; padding: 7px 12px; font-size: 12px; color: #c92a2a; font-weight: 600; line-height: 1.5; }
.man-note { font-size: 13px; color: #555; background: #fff7fb; border: 1px dashed #f3b9d2; border-radius: 8px; padding: 8px 12px; margin: 6px 0 12px; }
.man-tip { font-size: 13px; color: #1f6f4a; background: #eafaf1; border-left: 4px solid #57c98a; border-radius: 6px; padding: 7px 12px; margin: 8px 0; line-height: 1.7; }
.man-tip b { color: #16794e; }
.man-warn { font-size: 13px; color: #9a4a00; background: #fff5e8; border-left: 4px solid #f0a64a; border-radius: 6px; padding: 7px 12px; margin: 8px 0; line-height: 1.7; }
.man-warn b { color: #9a4a00; }
.staff-add-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.staff-add-btn { background: linear-gradient(105deg,#f8b6cd,#fcd9e4); color: #a61e5d; border: 1px solid #f3b9d2; border-radius: 20px; padding: 9px 18px; font-size: 14px; font-weight: 700; cursor: pointer; }
.staff-add-btn:hover { filter: brightness(0.97); }
.staff-add-hint { font-size: 12px; color: #888; }
.manual-foot { color: #888; font-size: 13px; margin-top: 18px; }
.manual-sub { font-size: 16px; color: #1f2a44; margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 2px solid #f7c6da; }
/* Googleスライド埋め込み（16:9レスポンシブ） */
.slide-embed { position: relative; width: 100%; padding-top: 56.25%; margin: 4px 0 6px; background: #f1f3f7; border-radius: 8px; overflow: hidden; }
.slide-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.slide-open { margin-left: auto; font-size: 12px; color: #1971c2; font-weight: 600; text-decoration: none; white-space: nowrap; }
.slide-open:hover { text-decoration: underline; }
/* 仕入れ商品一覧の納品状況ミニ表 */
.stat.ship-status { min-width: 220px; }
.ss-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px 10px; font-size: 12px; color: #495057; }
.ss-grid b { color: #1f2a44; font-size: 14px; }

/* ===== ダッシュボード ===== */
.dash-h { font-size: 20px; color: #a61e5d; margin: 8px 0 16px; }
/* minmax(0,1fr)＝中の広いテーブル(仕入れ強化)にグリッドを押し広げさせない */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.dash-card { background: #fff; border: 1px solid #e3e8f0; border-radius: 12px; padding: 16px 18px; min-width: 0; }
.dash-card.dash-wide { grid-column: 1 / -1; }
.dash-card h3 { font-size: 14px; color: #1f2a44; margin: 0 0 14px; }
.dash-note { font-size: 12px; color: #888; margin-top: 14px; }
.dash-loading { padding: 40px; text-align: center; color: #888; }
/* ファネル */
.funnel-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.funnel-label { width: 96px; font-size: 13px; color: #555; flex: 0 0 96px; }
.funnel-bar-wrap { flex: 1; background: #f1f3f7; border-radius: 6px; }
.funnel-bar { background: linear-gradient(90deg, #c2255c, #e08aa6); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 6px; text-align: right; min-width: 30px; }
/* 月次バー */
.mbar-chart { display: flex; align-items: flex-end; gap: 18px; height: 180px; padding: 0 6px; }
.mbar-col { display: flex; flex-direction: column; align-items: center; flex: 1; }
.mbar-stack { display: flex; align-items: flex-end; gap: 3px; height: 145px; }
.mbar { width: 16px; border-radius: 3px 3px 0 0; }
.mbar.cost { background: #b8788d; }
.mbar.profit { background: #0ca678; }
.mbar-label { font-size: 11px; color: #555; margin-top: 6px; }
.mbar-val { font-size: 11px; color: #c2255c; font-weight: 700; }
/* ランキング */
.rank-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #f1f3f7; font-size: 13px; }
.rank-name { font-weight: 700; color: #1f2a44; }
.rank-val { color: #c2255c; }
/* アラート */
.alert-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #f1f3f7; font-size: 13px; color: #555; }
.alert-num { font-size: 20px; color: #e64980; }
/* ランキング：数字は緑。20万位以下（売れにくい）は行全体をうすい紫で警告 */
.rank-badge { color: #0b7a43; font-weight: 700; }
/* 仕入れ管理：納品担当からの情報（異常・検品日・納品備考）をオレンジで色分け */
body.role-buyers td[data-k="defect"],
body.role-buyers td[data-k="kenpin_date"],
body.role-buyers td[data-k="note2"] { background: #fff4e6; }
body.role-buyers th[data-sort="defect"],
body.role-buyers th[data-sort="kenpin_date"],
body.role-buyers th[data-sort="note2"] { background: #ffe8cc; color: #d9480f; }
/* リピート品（10回以上仕入れ）バッジ */
.repeat-badge { display: inline-block; background: #fff0e6; color: #d9480f; font-weight: 800; font-size: 11px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; border: 1px solid #ffc9a8; }
.stock-badge { display: inline-block; background: #e7f5ff; color: #1971c2; font-weight: 800; font-size: 11px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; border: 1px solid #a5d8ff; }
.model-stock-info { background: #e7f5ff; border: 1px solid #a5d8ff; border-radius: 8px; padding: 8px 12px; font-size: 13px; color: #1971c2; margin: 4px 0 10px; }
.supplier-breakdown { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px; padding: 10px 14px; margin-top: 10px; }
.sb-title { font-size: 12px; font-weight: 700; color: #495057; margin-bottom: 8px; }
.sb-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; font-size: 12px; }
.sb-label { width: 110px; flex-shrink: 0; color: #333; font-weight: 500; }
.sb-bar-wrap { flex: 1; background: #e9ecef; border-radius: 4px; height: 14px; overflow: hidden; }
.sb-bar { height: 100%; background: linear-gradient(90deg, #0ca678, #63e6be); border-radius: 4px; transition: width 0.4s; }
.sb-cnt { width: 52px; text-align: right; flex-shrink: 0; color: #1f2a44; }
.sb-cnt b { color: #c2255c; }
.sb-pct { width: 34px; text-align: right; flex-shrink: 0; color: #868e96; font-size: 11px; }
.supplier-breakdown-text { background: #fff7e6; border: 1px solid #ffd8a8; border-radius: 10px; padding: 10px 18px; display: flex; flex-direction: column; gap: 6px; margin: 6px 0 2px; }
.sb-text-title { font-size: 11px; color: #6b7280; }
.sb-text-items { display: flex; flex-wrap: wrap; gap: 10px; }
.sb-text-item { font-size: 13px; color: #1f2a44; font-weight: 500; }
.sb-text-item b { color: #c2255c; font-size: 15px; }
.repeat-n { color: #adb5bd; font-size: 11px; }
tbody tr.rowlowrank td { background: #f3e8ff !important; }
tbody tr.rowlowrank:hover td { background: #ead6fb !important; }
.card.rowlowrank { background: #f3e8ff; }
/* 商品リストの色の凡例 */
.color-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 8px 14px; margin: 0 0 8px; background: #fff; border: 1px solid #e3e8f0; border-radius: 8px; font-size: 12px; color: #555; }
.color-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.color-legend i { width: 16px; height: 12px; border-radius: 3px; border: 1px solid #00000018; display: inline-block; }
.lg-alert { background: #ffd6d6; }
.lg-warn { background: #fff9d6; }
.lg-lowrank { background: #f3e8ff; }
.lg-ng { background: #c4c8ce; }
.alert-num.alert-defect { color: #e03131; font-weight: 800; }

/* 担当者ビューの最上部見出し */
.person-heading { padding: 18px 20px 6px; }
.person-heading:empty { padding: 0; }
.person-title { margin: 14px 0 4px; font-size: 24px; font-weight: 800; color: #1f2a44; white-space: nowrap; }
.person-title span { color: #c2255c; }
/* タイトル横のアドバイス（ノートPCでも下に行かず横に並ぶ） */
.title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.title-advice { flex: 1 1 280px; min-width: 240px; background: #fff7e6; border: 1px solid #ffd8a8;
  color: #8a5a00; border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; line-height: 1.5; }
.title-advice:empty { display: none; }
/* 行クリックで編集（仕入れ・商品リスト） */
tr.row-clickable { cursor: pointer; }
tr.row-clickable:hover td { background: #fff7e6 !important; }
.ship-toggle { margin-left: 16px; font-size: 13px; color: #0b7a43; cursor: pointer; font-weight: 600; }
.ship-toggle input { cursor: pointer; vertical-align: middle; }
/* 未出荷のみトグル（ツールバーで目立たせる） */
.ship-toggle-pill {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: #e6fcf5; color: #0b7a43; border: 1.5px solid #63e6be; white-space: nowrap;
}
.ship-toggle-pill:hover { background: #c3fae8; }
.ship-toggle-pill input { cursor: pointer; vertical-align: middle; width: 15px; height: 15px; accent-color: #0ca678; }
/* 仕入情報 折りたたみボタン */
.collapse-pill { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer;
  background: #fff; color: #1971c2; border: 1.5px solid #a5d8ff; white-space: nowrap; }
.collapse-pill:hover { background: #e7f5ff; }
.collapse-pill.on { background: #1971c2; color: #fff; border-color: #1971c2; }
.stat-clickable { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.stat-clickable:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(194,37,92,.15); }
.stat-active { border-color: #c2255c; background: #fde7f0; }

.toolbar { display: flex; gap: 10px; align-items: center; padding: 14px 20px; flex-wrap: wrap; }
.toolbar input, .toolbar select {
  padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; background: #fff;
}
#q { min-width: 240px; }
#genreFilter, #makerFilter { min-width: 160px; }
.count { color: #6b7280; font-size: 13px; }
.right-buttons {
  margin-left: auto; display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px;
  align-items: center; justify-content: flex-end;
}
.right-buttons button.primary { margin-left: 0; }
/* 🛠 道具：ときどきしか使わないボタンをしまう場所。
   2026-09-04 くみ「なんかごちゃごちゃなので、もうちょいレイアウトなんとかならんかね？」 */
.right-buttons .tool-slot { display: none; }   /* 元の場所の目印。見えない */
.tools-wrap { position: relative; display: inline-block; }
.tools-btn {
  background: #fff; color: #495057; border: 1px solid #ced4da;
  padding: 9px 14px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 13px;
}
.tools-btn:hover, .tools-btn.open { background: #f1f3f5; }
.tools-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 230px; max-height: 70vh; overflow: auto;
  background: #fff; border: 1px solid #dee2e6; border-radius: 10px; padding: 6px;
  box-shadow: 0 10px 28px #1f2a4426;
  display: flex; flex-direction: column; gap: 2px;
}
.tools-menu[hidden] { display: none; }
/* 中のボタンは、色の付いた「ボタン」ではなく、上から並ぶ「品書き」にする */
.tools-menu button {
  display: block; width: 100%; text-align: left; white-space: nowrap;
  background: #fff !important; color: #1f2a44 !important; border: none !important;
  margin: 0; padding: 9px 12px; border-radius: 7px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.tools-menu button:hover { background: #f1f3f5 !important; }
/* 未確認（中古/新品のOK/NGがまだ入っていない）。押すと選べる。
   2026-09-04 くみ「未確認のNGにするときも理由選べると良いな」 */
.okng.okng-pend {
  background: #fff; color: #adb5bd; border: 1px dashed #ced4da;
  font-weight: 600; font-size: 10px; padding: 2px 3px; white-space: nowrap;
}
.okng.okng-pend:hover { background: #fff5f8; color: #c2255c; border-color: #f7c6da; }
.ra-select .ra-ok { border-color: #63e6be; color: #0b7a43; }
.ra-select .ra-ok:hover { background: #e6f7ee; }
/* 色の凡例と使い方は、ふだんはたたんでおく */
.legend-btn {
  background: none; border: none; padding: 0 0 4px; cursor: pointer;
  color: #868e96; font-size: 12px; font-weight: 600;
}
.legend-btn:hover { color: #c2255c; }
#legendBox[hidden] { display: none; }
/* 在庫と販売履歴：返品で戻ってきた個体の印。押すと返品の処理が開く。
   2026-09-04 くみ「返品されてフリマ売のやつとか在庫に出ちゃうと判断に迷う」 */
.sku-tbl .sku-c-ret {
  background: #fff4e6; color: #d9480f; border: 1px solid #ffd8a8;
  border-radius: 8px; padding: 3px 8px; font-size: 11px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.sku-tbl .sku-c-ret:hover { background: #ffe8cc; }
/* 復旧メモ：編集ポップアップの一番下に、たたんで置く。
   2026-09-04 くみ「この一覧に出てくると長いので、編集画面の一番下とかに載せる程度でOK」 */
.sys-note-box {
  background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px;
  padding: 10px 12px; font-size: 12px; line-height: 1.7; color: #495057;
  white-space: pre-wrap; word-break: break-word;
  max-height: 240px; overflow: auto;
}
/* 在庫でSKUを探して0件だった時の説明。
   2026-09-04 くみ「これまだ在庫あるんだけど在庫一覧にいないの何でだろう？」 */
.why-box {
  background: #fff9db; border: 1px solid #ffe066; border-radius: 10px;
  padding: 12px 14px; margin: 4px 0 8px; font-size: 13px; line-height: 1.8;
  color: #5c3a1e; max-width: 900px;
}
.why-box.why-ok { background: #ebfbee; border-color: #8ce99a; color: #0b7a43; }
.why-box .why-h { font-weight: 700; margin-bottom: 4px; }
.why-box .why-u { font-size: 12px; color: #868e96; margin-bottom: 6px; word-break: break-all; }
.why-box .why-r { font-weight: 700; }
.why-box .why-t { font-size: 12px; color: #868e96; margin-top: 4px; }
/* 「在庫には出ています」の時に、いま隠している絞り込みを名指しする箇条書き */
.why-box .why-blk { margin: 4px 0 0; padding-left: 1.2em; }
.why-box .why-blk li { margin: 2px 0; color: #495057; line-height: 1.5; }
.why-box .why-blk b { color: #c2255c; }
.why-box .why-sold { font-size: 12px; color: #868e96; margin-top: 6px; }
.why-box .why-sold span { display: inline-block; margin-right: 12px; }
/* 自己発送のまま残っている商品の一覧（在庫に戻すボタン）
   2026-09-04 くみ「自己発送からFBAにしたんだとおもう！」 */
.sku-tbl .mf-fix {
  background: #e7f5ff; color: #1971c2; border: 1px solid #a5d8ff;
  border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.sku-tbl .mf-fix:hover { background: #d0ebff; }
.sku-tbl .mf-fix:disabled { opacity: .5; cursor: default; }
/* リサーチ：この状態にした人と日時。マウスを乗せると全部の履歴が出る。
   2026-09-05 くみ「これを菅原さんが見送りにしてたんだけど、私じゃないよね？」 */
/* 仕入金額の内訳。編集ポップアップでは .fld input が width:100% になるため、
   1つずつ縦に積まれて合計が画面の外に出ていた。横に並べて全部見えるようにする。
   値引き（クーポン・ポイント）は引き算なので赤くする。
   2026-09-05 くみ「クーポンとかポイントとかで値引きした金額も反映できると良いなぁ」 */
.fld .cost-breakdown input { width: 108px; min-width: 0; flex: 0 1 108px; }
.cost-breakdown .cost-minus { color: #c92a2a; font-weight: 700; font-size: 15px; }
.cost-breakdown #f_cost_discount { border-color: #f7c6da; background: #fff5f8; }
/* ❓判断できない の画面に出す気づき。「使っていた＝動いていた」を押す瞬間に伝える。
   2026-09-07 くみ「動作の記載が曖昧ってことで保留にしちゃうんだけど
                    一度使用したのみの美品 とかはOKなんだよね〜」 */
.hold-hint {
  margin-top: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.8;
  background: #ebfbee; border: 1px solid #8ce99a; border-radius: 8px; color: #2b8a3e;
}
/* リサーチ候補の「📜 履歴」ボタン。押すと更新履歴のポップアップが開く。
   もとは「あとから ○○ が変更（…）」と行に書き足していた（2026-09-08 くみ）。 */
.rq-histbtn {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  background: #f1f3f5; color: #495057; border: 1px solid #dee2e6; border-radius: 8px;
  font: inherit; font-size: 10px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
/* 記録が残っていない候補（記録の仕組みを入れる前に仕分けられた分）*/
.rq-histbtn-none { opacity: .7; border-style: dashed; }
.rq-histbtn:hover { background: #e9ecef; }
/* 更新履歴ポップアップの見出し（最初に仕分けた人／いまの状態／保留にした人） */
.rq-hist-head {
  background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px;
  padding: 8px 12px; margin-bottom: 10px; font-size: 12px; color: #1f2a44; line-height: 1.7;
}
.rq-hist-k { display: inline-block; min-width: 9.5em; color: #868e96; font-size: 11px; }
.rq-hist-box { max-height: 320px; }
button.primary {
  margin-left: auto; background: #c2255c; color: #fff; border: none;
  padding: 9px 16px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 13px;
}
button.primary:hover { background: #a51e4d; }
button.primary.add { background: #e64980; }
button.primary.add:hover { background: #d6336c; }

.hint { padding: 0 20px 10px; color: #6b7280; font-size: 12px; }

.filter-btn { padding: 7px 12px; border: 1px solid #f7c6da; background: #fff; color: #c2255c; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; }
.filter-btn:hover { background: #fde7f0; }
.more-filters { display: flex; flex-wrap: wrap; gap: 14px 20px; padding: 12px 20px; background: #fff; border-top: 1px solid #f1f3f7; border-bottom: 1px solid #f1f3f7; align-items: center; }
.more-filters[hidden] { display: none; }
/* 表示列パネル */
.col-toggle-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; }
.col-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #1f2a44; cursor: pointer; padding: 4px 0; }
.col-toggle input { cursor: pointer; }
.more-filters label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #555; }
.more-filters select, .more-filters input { padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 12px; }

/* 縦スクロール領域にして、列ヘッダーを固定表示 */
/* 左右はmargin（paddingだと横スクロール時にNo列の左の隙間に中身が漏れる）→marginでスクロール領域外に */
main { margin: 0 20px; padding: 0 0 40px; overflow: auto; max-height: calc(100vh - 215px); -webkit-overflow-scrolling: touch; }
/* width:max-content で列幅の合計まで広げる→画面より広ければ横スクロール（スプレッドシート風） */
table { border-collapse: collapse; background: #fff; font-size: 13px; table-layout: fixed; width: max-content; min-width: 100%; }
th, td { border: 1px solid #e6eaf1; padding: 6px 8px; text-align: left; vertical-align: top; }
th { white-space: nowrap; }   /* ヘッダーは折り返さない */
td { font-size: 12px; white-space: normal; word-break: break-word; }   /* 中身は…で切らず折り返し表示 */
/* お金・販売数まわりを青系で強調（見やすく） */
td[data-k="cost_price"], td[data-k="break_even"], td[data-k="sell_price"],
td[data-k="item_profit"], td[data-k="item_profit_rate"],
td[data-k="turn"], td[data-k="used_turn"], td[data-k="new_turn"] { background: #eaf4ff; }
th[data-sort="cost_price"], th[data-sort="break_even"], th[data-sort="sell_price"],
th[data-sort="item_profit"], th[data-sort="item_profit_rate"],
th[data-sort="turn"], th[data-sort="used_turn"], th[data-sort="new_turn"] { background: #d3e9ff; color: #1864ab; }
/* ランキング列は緑系で色分け（販売数と同じ要領） */
td[data-k="rank"] { background: #e9f9ef; }
th[data-sort="rank"] { background: #c3edd2; color: #0b7a43; }
th { background: #eef2f9; position: sticky; top: 0; z-index: 5; font-size: 12px; color: #374151; line-height: 1.3; text-align: center; vertical-align: middle; }
/* 2段ヘッダー（納品の納品担当者入力欄バンド）の固定 */
#superHead th { top: 0; z-index: 6; height: 30px; }
#head th { top: 0; }
/* 2段ヘッダー時は2行目(#head)を1行目の下に貼り付ける（重なり崩れ防止） */
#grid.two-row-head #head th { top: 30px; }
/* 横スクロール時に左側を固定する列（No〜SKU） */
th.frz, td.frz { position: sticky; }
td.frz { z-index: 4; background: #fff; }
th.frz { z-index: 7; }
#superHead th.frz { z-index: 8; }
/* 固定列の右端に境界の影 */
th.frz-end, td.frz-end { box-shadow: 3px 0 5px -2px rgba(0,0,0,.18); }
td.center { text-align: center; }
/* 並べ替え可能ヘッダー */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: #fde7f0; color: #c2255c; }
th.sorted-asc::after { content: " ▲"; font-size: 10px; color: #c2255c; }
th.sorted-desc::after { content: " ▼"; font-size: 10px; color: #c2255c; }
/* グループ色分け */
th.grp-std { background: #fde7f0; color: #a61e5d; }
td.grp-std { background: #fff5f9; font-weight: 700; color: #a61e5d; }
th.grp-price { background: #fff7d6; color: #8a5a00; }
td.grp-price { background: #fffced; }
th.grp-sales { background: #e0f0ff; color: #1864ab; padding: 4px 8px; }
td.grp-sales { background: #f0f7ff; }
/* 納品担当の入力欄（検品〜備考）を色分け */
th.grp-ship { background: #e3f7ec; color: #0b7a43; }
td.grp-ship { background: #f0fbf5; }
/* SKU（自動生成・編集不可）。フォントは全体と統一 */
.sku-auto { font-size: 12px; color: #555; word-break: break-all; }
/* 状況バッジ（仕入れ商品一覧の納品進捗） */
.prog { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 10px; white-space: nowrap; }
.prog-stocked { background: #fff3bf; color: #997404; }
.prog-none   { background: #f1f3f5; color: #868e96; }
/* ⚠️異常ありで止まっている分（2026-10-03 くみ「検品はしたけど異常ありだから
   未検品じゃなくて異常ありステータスがいいかな」）。未検品と見分けが付くように赤。 */
.prog-defect { background: #ffe3e3; color: #c92a2a; font-weight: 800; }
.prog-kenpin { background: #c5f6fa; color: #0c8599; }
.prog-shoot  { background: #d0ebff; color: #1864ab; }
.prog-reg    { background: #d3f9d8; color: #2b8a3e; }
.prog-plan   { background: #ffe8cc; color: #d9480f; }
.prog-self   { background: #e5dbff; color: #6741d9; }
.prog-home   { background: #d0ebff; color: #1971c2; }
/* フリマ＝Amazonに出せないので、ヤフオク・メルカリ等で売る。
   2026-09-21 くみ「出品できなくなったときのフリマ売りのときにステータス見えると良いよね」 */
.prog-flea   { background: #ffdeeb; color: #a61e4d; }
.prog-ship   { background: #c2255c; color: #fff; }
.prog-return { background: #ffe3e3; color: #c92a2a; border: 1px solid #ffa8a8; }   /* 返送在庫（返品で戻ってきた個体） */
.prog-cancel { background: #495057; color: #fff; }
/* 出荷完了行はグレーアウト */
/* 納品の完了(出荷済)行＝商品マスタのNG行と同じグレー・文字色 */
tbody tr.rowdone td { background: #c4c8ce !important; }
tbody tr.rowdone:hover td { background: #d4d7dc !important; }
tbody tr.rowdone .thumb { opacity: .6; }
/* 検品から5日経過＆出荷予定日なし＝滞留警告（赤） */
tbody tr.rowlate td { background: #ffd0d0 !important; }
tbody tr.rowlate:hover td { background: #ffbcbc !important; }
.card.rowlate { background: #ffd0d0; }
/* 検品で異常あり＝赤く強調（左に赤帯） */
tbody tr.row-defect td { background: #ffe3e3 !important; border-top: 1px solid #ffa8a8; border-bottom: 1px solid #ffa8a8; }
tbody tr.row-defect:hover td { background: #ffd0d0 !important; }
tbody tr.row-defect td:first-child { box-shadow: inset 4px 0 0 #e03131; }
.card.row-defect { background: #ffe3e3; box-shadow: inset 4px 0 0 #e03131; }
.defect-badge { display: inline-block; background: #e03131; color: #fff; font-weight: 700; font-size: 11px; padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
/* 着払いチェックボックス（追跡番号の右隣に横並び） */
.fld.trackfld { grid-column: 1 / -1; }   /* 2カラムグリッド内でも追跡番号行は全幅に */
.trackfld .with-btn { gap: 6px; align-items: center; flex-wrap: wrap; }
.trackfld .with-btn input#f_tracking_num { flex: 0 1 150px; min-width: 0; }   /* 広げず固定幅。着払いを押し出さない */
.trackfld .with-btn select#f_carrier { flex: 0 0 100px; }   /* 「日本郵便」が見切れないよう広め */
.trackfld .with-btn select#f_bundle { flex: 0 0 auto; width: auto; padding: 4px 6px; }
/* 追跡番号セルの同梱・着払いタグ */
.bundle-tag { display: inline-block; background: #e7f5ff; color: #1971c2; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.chaku-tag { display: inline-block; background: #fff3bf; color: #b5710e; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.chakubarai-check { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: #b5710e; white-space: nowrap; cursor: pointer; flex: 0 0 auto; }
.chakubarai-check input { accent-color: #e8a53a; width: 17px; height: 17px; cursor: pointer; margin: 0; }
/* 着払い送料入力欄（納品担当の編集画面） */
.chakubarai-cost-fld { background: #fdf3e0; border: 1px solid #e8b86d; border-radius: 8px; padding: 10px 14px; }
.chakubarai-cost-fld label { color: #5c3a1e; font-weight: 700; }
/* ダッシュボード：残高2000円割れの警告バナー */
.cash-alert-banner { background: #fff0f0; border: 2px solid #ff8787; color: #c92a2a; font-weight: 800; padding: 12px 16px; border-radius: 10px; margin-bottom: 12px; font-size: 15px; }
/* 税理士＝閲覧専用：編集系UIを隠す／触れないようにする（サーバー側でも書込ブロック） */
body.role-readonly .right-buttons button,
body.role-readonly #addBtn,
body.role-readonly .staff-add-bar,
body.role-readonly #modalSave,
body.role-readonly #modalDelete,
body.role-readonly #modalDup,
body.role-readonly #modalDupEdit { display: none !important; }
body.role-readonly #grid input, body.role-readonly #grid select, body.role-readonly #grid textarea,
body.role-readonly #cards input, body.role-readonly #cards select, body.role-readonly #cards textarea { pointer-events: none; background: #f6f6f8; }
.acc-alert-banner { background: #fff8ec; border: 2px solid #e8b86d; color: #b5710e; font-weight: 800; padding: 12px 16px; border-radius: 10px; margin-bottom: 12px; font-size: 15px; }
/* 付属品（別途仕入れ）プルダウン：大石さんの登録フォーム */
.acc-picker-fld .acc-rows { display: flex; flex-direction: column; gap: 6px; }
.acc-row { display: flex; align-items: center; gap: 6px; }
.acc-row .acc-sel { flex: 1; min-width: 0; padding: 7px 8px; border: 1px solid #d7e3da; border-radius: 8px; font-size: 13px; }
.acc-row .acc-name { width: 110px; padding: 7px 8px; border: 1px solid #d7e3da; border-radius: 8px; font-size: 13px; }
.acc-row .acc-amt { width: 88px; padding: 7px 8px; border: 1px solid #f3b9d2; border-radius: 8px; font-size: 14px; }
.acc-row .acc-del { width: 30px; height: 30px; border: 1px solid #ddd; background: #fff; border-radius: 8px; color: #c92a2a; cursor: pointer; font-size: 16px; line-height: 1; }
.acc-addrow { margin-top: 6px; padding: 6px 12px; border: 1px dashed #63b98a; background: #f4fbf6; color: #0b7a43; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 700; }
.acc-picker-hint { font-size: 12px; color: #888; margin-top: 5px; line-height: 1.5; }
/* 在庫プルダウンを使わない時（久美さん）：品名欄をのばして入力しやすく */
.acc-row.acc-free .acc-name { flex: 1; width: auto; min-width: 0; }
.acc-row.acc-free .acc-url { width: 130px; }
.acc-picker-fld .acc-stock-toggle { display: inline-flex; align-items: center; gap: 5px; width: auto; margin: 0 8px 0 0; padding: 2px 9px 2px 6px; border: 1px solid #d7e3da; border-radius: 12px; background: #fafffb; color: #0b7a43; font-size: 12px; font-weight: 700; cursor: pointer; vertical-align: middle; }
.acc-picker-fld .acc-stock-toggle input { width: 14px; height: 14px; margin: 0; cursor: pointer; }
/* 付属品の使用確定チェック：鳴島さんの検品フォーム */
.acc-confirm-box { display: flex; flex-direction: column; gap: 5px; border: 1px solid #e7f0e9; border-radius: 8px; padding: 8px; background: #fafffb; }
.acc-confirm-row { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.acc-confirm-row input { width: 16px; height: 16px; }
.acc-cf-name { font-weight: 700; }
.acc-cf-amt { color: #c2255c; font-weight: 700; }
.acc-cf-tag { font-size: 11px; padding: 1px 7px; border-radius: 10px; }
.acc-cf-stock { background: #e6f4ea; color: #0b7a43; }
.acc-cf-link { font-size: 11px; color: #1971c2; text-decoration: underline; margin-left: 4px; }
.acc-row .acc-url { width: 110px; padding: 7px 8px; border: 1px solid #d7e3da; border-radius: 8px; font-size: 12px; }
.acc-cf-spot { background: #fff2e0; color: #b5710e; }
/* マスタ編集：登録者・更新者の表示（一番下） */
.master-meta { margin-top: 12px; padding-top: 10px; border-top: 1px solid #eee; font-size: 12px; color: #888; display: flex; flex-wrap: wrap; gap: 14px; }
.master-meta b { color: #555; }
/* 削除ボタン */
.del-btn { background: #fff; color: #c92a2a; border: 1px solid #ffc9c9; border-radius: 8px; padding: 9px 16px; font-weight: 700; cursor: pointer; font-size: 13px; }
.del-btn:hover { background: #fff0f0; border-color: #ff8787; }
/* 納品担当者入力欄スーパーヘッダー */
th.super-ship { background: #0ca678; color: #fff; font-size: 13px; letter-spacing: 1px; }
/* 販売数 グループ見出し2段 */
.grp-sales .grp-title { font-weight: 800; margin-bottom: 4px; }
.grp-sales .grp-subs { display: flex; justify-content: space-around; gap: 4px; font-size: 11px; font-weight: 600; }
.grp-sales .grp-subs span { flex: 1; }
/* 販売数列はきゅっと */
td.narrow { width: 38px; padding: 6px 4px; font-size: 12px; }
tbody tr:nth-child(even) { background: #fafbfe; }
td.name { white-space: normal; font-size: 12px; }
/* 折り返して見せる列（…で省略しない） */
td[data-k="add_word"], td[data-k="ng_word"], td[data-k="note"], td[data-k="note2"],
td[data-k="category"], td[data-k="size"], td[data-k="maker"], td[data-k="genre"],
td[data-k="supplier"], td[data-k="sold_at"], td[data-k="condition"], td[data-k="accessories"],
td[data-k="buyer"], td[data-k="delivery_shoot"], td[data-k="assignee"],
td[data-k="description"], td[data-k="movement"] {
  white-space: normal; font-size: 12px; word-break: break-word; overflow: visible;
}
/* ASIN/型番/SKU/ID/追跡番号は break-all（半角英数の長い文字列は強制折り返し）。フォントは全体と統一 */
td[data-k="asin"], td[data-k="model"], td[data-k="amazon_sku"], td[data-k="yahoo_code"],
td[data-k="supplier_id"], td[data-k="tracking"] {
  white-space: normal; font-size: 12px; word-break: break-all; overflow: visible;
}
/* 購入日・Noは省略しない（短い値だけど…が出ないように） */
td[data-k="no"], td[data-k="view_no"], td[data-k="purchase_date"] {
  overflow: visible; white-space: nowrap; text-align: center;
}
/* 金額系（仕入金額・損益分岐・販売金額・見込み利益・利益率）は中央寄せに統一 */
td[data-k="cost_price"], td[data-k="break_even"], td[data-k="sell_price"],
td[data-k="item_profit"], td[data-k="item_profit_rate"],
td[data-k="no"], td[data-k="view_no"] { text-align: center; }
/* 仕入れ担当・納品担当も中央寄せ */
td[data-k="buyer"], td[data-k="assignee"] {
  text-align: center;
}
/* 担当者名でパステル色分け */
td.p-pink   { background: #fde4ee !important; }   /* 久美 ピンク */
td.p-yellow { background: #fdf6cf !important; }   /* 大石 イエロー */
td.p-green  { background: #d8f3e3 !important; }   /* 鳴島 グリーン */
/* 価格列・リンク列・最終更新列は…で省略させず必ず全表示 */
td.grp-std, td.grp-price, td[data-k="updated"] { overflow: visible; }
/* リンク列はグリッドが収まる幅を確保 */
td[data-k="_links"] { overflow: visible; padding: 6px 4px; }
/* Ama LINK / 仕入れLINK / 追跡 セルも切れない */
td[data-k="_amazon_link"], td[data-k="_supplier_link"], td[data-k="_tracking_link"] {
  overflow: visible; text-align: center; padding: 6px 4px;
}

.tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 700; }
.src-自分 { background: #e7f5ff; color: #1971c2; }
.src-大石 { background: #fff3bf; color: #e67700; }

select.status, input.cell, textarea.cell-wide {
  border: 1px solid #d0d7e2; border-radius: 6px; padding: 4px 6px; font-size: 12px; font-family: inherit;
  box-sizing: border-box; max-width: 100%;
}
select.status { width: 100%; }
input.cell { width: 100%; }
textarea.cell-wide {
  width: 100%; min-width: 0; min-height: 56px;
  resize: vertical; font-size: 12px; line-height: 1.4;
}
input.cell.saved, textarea.cell-wide.saved { border-color: #c2255c; background: #ffe9f1; }
td.name.editable { min-width: 240px; }

/* 新品/中古 仕入れOK可否バッジ */
.okng { font-size: 11px; padding: 2px 6px; border-radius: 10px; font-weight: 700; display: inline-block; }
.okng.ok { background: #e6fcf0; color: #0ca678; }
.okng.ng { background: #f1f3f5; color: #adb5bd; }
/* 商品リストの OK / NG は押すとその場で入れ替わる。押せると分かるようにする。
   2026-09-03 くみ「クリックするだけで切り替えできる仕様はできる？」 */
/* 日別の中の「仕入れ担当ごと」の小さい行。表を広げずに内訳を出す。
   2026-09-03 くみ「おおいしさんと私のそれぞれの数値も入れられる？」 */
.bd-table tr.bd-sub td { padding: 2px 8px 6px 14px; border-top: 0; background: #fbfcfd; }
.bd-table tr.bd-sub .bd-p { display: inline-block; font-size: 11.5px; color: #495057;
  background: #fff; border: 1px solid #e9ecef; border-radius: 10px;
  padding: 1px 8px; margin: 0 6px 2px 0; white-space: nowrap; }

/* 在庫と販売履歴のポップアップ：見つけたその場で「追えない」にできるボタン。
   2026-09-03 くみ「とりあえず見つけた時になくせればそれでいい」 */
.sku-tbl .sku-c-act { text-align: right; white-space: nowrap; width: 96px; }
.sku-giveup { border: 1px solid #ced4da; background: #fff; color: #495057;
  border-radius: 6px; padding: 2px 8px; font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.sku-giveup:hover { background: #f8f9fa; border-color: #adb5bd; }
.sku-giveup:disabled { opacity: .6; cursor: default; }

.okng-toggle { cursor: pointer; user-select: none; }
.okng-toggle:hover { filter: brightness(0.94); box-shadow: 0 0 0 2px #f7c6da; }
/* 新品/中古 列はtruncateさせない（バッジが省略されないように） */
td[data-k="new_status"], td[data-k="used_status"] { overflow: visible; }
/* 新品＜中古の行は赤くする（新品を買うべき注意） */
tr.rowalert td { background: #ffd6d6; }
.card.rowalert { background: #ffd6d6; }
/* 中古NG＝基本仕入れしない行は「セルだけ」グレーアウト（文字色はそのまま）。※rowngを後に書いて優先 */
tr.rowng td { background: #c4c8ce; }
tr.rowng:hover td { background: #d4d7dc; }
.card.rowng { background: #c4c8ce; }

/* 商品マスタの各種リンクボタン（2列グリッド、モノトレーサーが収まる幅） */
.mlinks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }
.mlinks a {
  font-size: 11px; padding: 3px 4px; border-radius: 5px; text-decoration: none;
  background: #fde7f0; color: #c2255c; border: 1px solid #f7c6da;
  white-space: nowrap; text-align: center;
}
.mlinks a:hover { background: #c2255c; color: #fff; }
/* 単一リンク（仕入れ商品管理表の Ama/Yahoo/仕入元 LINK） */
a.single-link {
  display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 5px;
  text-decoration: none; background: #fde7f0; color: #c2255c;
  border: 1px solid #f7c6da; white-space: nowrap;
}
a.single-link:hover { background: #c2255c; color: #fff; }
/* 追跡リンク（📦） */
a.track-link { text-decoration: none; font-size: 14px; margin-left: 2px; cursor: pointer; }
a.track-link:hover { opacity: 0.6; }
/* 説明文コピー：SKUコピー(⧉)と同じ小アイコン仕様 */
button.desc-copy { margin-left: 0; padding: 0 6px; font-size: 13px; line-height: 1.5; border: 1px solid #f3b9d2; background: #fff; color: #c2255c; border-radius: 4px; cursor: pointer; vertical-align: middle; }
button.desc-copy:hover { background: #fde7f0; }

.st-在庫 { color:#868e96; } .st-仕入済 { color:#1971c2; } .st-検品済 { color:#0c8599; }
.st-登録済 { color:#5f3dc4; } .st-撮影済 { color:#9c36b5; } .st-出荷済 { color:#c2255c; } .st-売却済 { color:#495057; }

/* クリックで編集できるセル */
td.editable, .card .v.editable { cursor: pointer; }
td.editable:hover { background: #fff7e6; }
td.editable::after { content: " ✎"; color: #c7ccd6; font-size: 11px; }
.card .v.editable { border-bottom: 1px dashed #d0d7e2; }
.thumb { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; border: 1px solid #e3e8f0; background:#fff; }
/* 画像セルは上揃え＆中央寄せ（行が高くても画像が上に来る） */
td[data-k="image_url"] { vertical-align: top; text-align: center; padding-top: 8px; }

/* ページング */
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 12px 0; border-top: 1px solid #f0d6e0; background: #fff; }
.pager:empty { display: none; }   /* 担当者選択・ダッシュボード等、ページャー不要時は白帯・線を出さない */
.pager button { padding: 6px 14px; border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager .pinfo { color: #6b7280; font-size: 13px; }
.pager select { padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font-size: 12px; }

/* モーダル */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,20,30,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-overlay[hidden] { display: none; }
.modal { background: #fff; border-radius: 14px; width: 560px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #eef2f7; font-weight: 700; }
.modal-head > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-head button { border: none; background: none; font-size: 18px; cursor: pointer; color: #6b7280; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid #eef2f7; display: flex; justify-content: flex-end; gap: 8px; }
.modal-foot button { padding: 9px 18px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; cursor: pointer; font-weight: 600; }
.modal-foot button.primary { background: #c2255c; color: #fff; border: none; }
.modal-foot .modal-del { margin-right: auto; color: #c92a2a; border-color: #ffc9c9; }
.modal-foot .modal-del:hover { background: #fff0f0; border-color: #ff8787; }
/* 複製系（複製・複製して編集）とキャンセル/保存の間に区切りの余白を入れる */
.modal-foot #modalCancel { margin-left: 20px; }
.fld { margin-bottom: 12px; }
.fld label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.fld input, .fld select, .fld textarea { width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; }
/* 上の width:100% は文字を入れる欄のためのもの。チェックボックス・ラジオまで100%になると
   1行を丸ごと占領して真ん中に浮いてしまう（別途仕入れ付属品の確認欄で崩れていた）。ここで戻す。 */
.fld input[type="checkbox"], .fld input[type="radio"] {
  width: auto; height: auto; padding: 0; border: 0; border-radius: 0; flex: none; }
.sec-label { display: block; font-size: 12px; font-weight: 700; color: #c2255c; margin: 14px 0 8px; padding-bottom: 4px; border-bottom: 1px solid #fde7f0; }
.modal { width: 720px; }
.fldgrid .fld input { font-size: 13px; }

/* 俺様価格 警告 */
tr.rowwarn td { background: #fff9d6; }
.card.rowwarn { background: #fff9d6; }

/* 担当者選択画面 */
.picker-h { margin: 8px 0 4px; font-size: 16px; color: #a61e5d; }
.picker-desc { margin: 0 0 16px; font-size: 13px; color: #6b7280; }
.picker-section { font-size: 13px; color: #6b7280; margin: 18px 0 10px; font-weight: 600; }
.picker-section.retired-h { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 10px; }
.picker-section.retired-h:hover { color: #c2255c; }
.picker-section.retired-h #retiredCaret { font-size: 11px; color: #c2255c; font-weight: 700; }
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; padding: 4px 0 14px; }
.person-card {
  background: #fff; border: 1px solid #f7c6da; border-radius: 12px;
  padding: 24px 18px; cursor: pointer; text-align: center;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.person-card:hover {
  transform: translateY(-2px); border-color: #c2255c;
  box-shadow: 0 6px 18px rgba(194,37,92,.18);
}
.person-card.retired {
  background: #f5f5f5; border-color: #d4d4d4; opacity: 0.7;
}
.person-card.retired:hover { opacity: 1; border-color: #adb5bd; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.person-card.retired .person-name { color: #6b7280; }
.person-card.retired .person-count { color: #adb5bd; }
.person-name { font-size: 18px; font-weight: 700; color: #1f2a44; margin-bottom: 6px; }
.person-count { font-size: 13px; color: #c2255c; font-weight: 600; }
.back-btn {
  padding: 6px 12px; border: 1px solid #c2255c; background: #fff;
  color: #c2255c; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600;
}
.back-btn:hover { background: #fde7f0; }

/* マスタ設定 */
.settings-grid { display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }
.settings-block { background: #fff; border: 1px solid #e3e8f0; border-radius: 12px; padding: 0 18px; }
.settings-block h3 { margin: 0 0 12px; font-size: 14px; color: #1f2a44; }
/* アコーディオン見出し（クリックで開閉） */
.settings-summary {
  display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none;
  padding: 14px 4px; font-size: 15px; font-weight: 700; color: #1f2a44; user-select: none;
}
.settings-summary::-webkit-details-marker { display: none; }
.settings-summary::before {
  content: "▶"; font-size: 11px; color: #c2255c; transition: transform .15s;
}
details[open] > .settings-summary::before { transform: rotate(90deg); }
.settings-summary:hover { color: #c2255c; }
.settings-summary .st-count { font-size: 12px; font-weight: 600; color: #fff; background: #d3a3b3; border-radius: 10px; padding: 1px 9px; }
.settings-block[open] { padding-bottom: 16px; }
.settings-block .settings-table { margin-bottom: 10px; }
.settings-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.settings-table th { background: #fde7f0; padding: 6px 8px; text-align: left; font-weight: 600; color: #555; }
.settings-table td { padding: 4px; border-bottom: 1px solid #f1f3f7; }
.settings-table input { width: 100%; padding: 6px 8px; border: 1px solid #e3e8f0; border-radius: 6px; font-size: 13px; }
.row-del { border: none; background: none; color: #adb5bd; font-size: 16px; cursor: pointer; padding: 0 8px; }
.row-del:hover { color: #e64980; }
.row-add { margin-top: 10px; padding: 6px 14px; border: 1px dashed #c2255c; background: #fff; color: #c2255c; border-radius: 6px; cursor: pointer; font-size: 12px; }
.row-add:hover { background: #fde7f0; }
.fld .with-btn { display: flex; gap: 8px; }
.fld .with-btn input { flex: 1; }
.fld .with-btn button { padding: 8px 12px; border-radius: 8px; border: 1px solid #e64980; background: #e64980; color: #fff; cursor: pointer; white-space: nowrap; }
.fldgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.autofill-note { font-size: 12px; padding: 8px 10px; border-radius: 8px; margin-bottom: 12px; }
.autofill-note.ok { background: #ebfbee; color: #2b8a3e; }
.autofill-note.ng { background: #fff3bf; color: #e67700; }
.master-card { display: flex; gap: 10px; }
.master-card img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid #e3e8f0; }

/* ===== カード表示（スマホ用 / 設定画面） ===== */
#cards { display: none; }
#cards.show { display: block; }     /* マスタ設定画面で使う */
.card {
  background: #fff; border: 1px solid #e3e8f0; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.card .ttl { font-weight: 700; font-size: 14px; line-height: 1.4; margin-bottom: 8px; }
.card .row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; border-top: 1px solid #f1f3f7; }
.card .row:first-of-type { border-top: none; }
.card .k { color: #6b7280; min-width: 78px; flex: 0 0 78px; font-size: 12px; }
.card .v { flex: 1; word-break: break-word; }

@media (max-width: 760px) {
  /* スマホはメニューをしまう。ヘッダーは
     1行目＝タイトルと名前、2行目＝いま開いている画面を出したボタン。
     ボタンを押した時だけ、下にメニューが開く。
     2026-09-22 くみ「スマホで見た時ヘッダーヤバいからハンバーガーとかにならんかな」 */
  header { padding: 10px 14px; gap: 8px 10px; }
  header h1 { font-size: 15px; order: 1; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .userbox { order: 2; margin-left: auto; }
  .nav-btn {
    order: 3; width: 100%; display: flex; align-items: center; gap: 10px;
    background: #fff; color: #a61e5d; border: none; border-radius: 10px;
    padding: 12px 16px; font-size: 15px; font-weight: 800; cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12); text-align: left;
  }
  .nav-btn .nav-ico { font-size: 17px; line-height: 1; }
  .nav-btn .nav-now { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-btn[aria-expanded="true"] { background: #a61e5d; color: #fff; }
  /* メニューは開いた時だけ。1行2カラムのグリッド（狭い画面で読みやすく） */
  .roles { order: 4; display: none; }
  .roles.open { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .role { flex: none; padding: 12px 8px; font-size: 14px; text-align: center; }
  .stats { padding: 12px 14px 0; }
  .stat { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .toolbar { padding: 12px 14px; }
  #q { width: 100%; min-width: 0; flex: 1 1 100%; }
  /* 狭い画面でもアクションボタンは横並び（折り返しOK） */
  button.primary { margin-left: 0; width: auto; }
  .right-buttons { flex-wrap: wrap; gap: 8px; width: 100%; justify-content: flex-start; }
  .right-buttons button.primary { flex: 1 1 auto; min-width: 0; }
  .hint { padding: 0 14px 10px; }
  main { margin: 0 14px; padding: 0 0 40px; }
  #grid { display: none; }      /* テーブルを隠し */
  #cards { display: block; }    /* カードを表示 */
  /* 「表で見る」ON時は狭い画面でもテーブル＋横スクロール */
  body.force-table #grid { display: table; }
  body.force-table #cards { display: none; }
  /* スマホのダッシュボードは1列・全幅で見やすく */
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ===== 必須項目バリデーション ===== */
.fld.has-error > label { color: #e03131; font-weight: 700; }
.fld.has-error input,
.fld.has-error textarea,
.fld.has-error select { border-color: #e03131 !important; background: #fff5f5; }
#reqErrors { background: #fff0f0; border: 1.5px solid #e03131; border-radius: 8px;
  padding: 10px 14px; margin-bottom: 12px; color: #c92a2a; font-size: 13px; line-height: 1.8; display: none; }
#reqErrors b { font-size: 14px; }

/* ===== 売上管理：販売先内訳・詳細ポップアップ・取込結果 ===== */
.sales-channels { flex: 1 1 100%; min-width: 240px; align-items: stretch; }
.sch-grid { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 2px 0; }
.sch-item { font-size: 12px; color: #1f2a44; }
.sch-item b { color: #c2255c; }
/* 在庫：状態の内訳は見込み利益率の横に並べる（全幅にしない） */
.stat.stock-states { flex: 0 1 auto; min-width: 0; }
.stat.stock-states .sch-grid { gap: 4px 12px; }
/* 在庫：状態の内訳チップ（クリックで絞り込み・選択中は枠付き） */
.stock-state-chip { padding: 1px 6px; border-radius: 10px; }
.stock-state-chip:hover { background: #f1f3f5; }
.stock-state-chip.chip-on { background: #fff0f6; box-shadow: inset 0 0 0 1.5px #c2255c; }
.sales-filters { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; vertical-align: middle; }
.sales-filters select { padding: 6px 10px; border: 1px solid #d0d7e2; border-radius: 8px; font-size: 13px; background: #fff; }
.sales-filters .sf-clear { padding: 6px 12px; border: 1px solid #f7c6da; border-radius: 8px; background: #fff; color: #c2255c; font-size: 12px; cursor: pointer; font-weight: 700; }
.buyer-block[data-buyer] { cursor: pointer; transition: box-shadow .15s; }
.buyer-block[data-buyer]:hover { box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.buyer-block.buyer-active { outline: 3px solid #c2255c; outline-offset: 1px; }
.sales-buyers { flex: 1 1 100%; min-width: 240px; align-items: stretch; display: block; }
/* 販売調整（その月に売れて返品になった分・報酬から差引） */
.adj-card { flex: 1 1 100%; min-width: 240px; display: block; border: 1px solid #ffc9c9; background: #fff5f5; }
.adj-skus { display: flex; flex-wrap: wrap; gap: 6px; }
.adj-sku { font-family: ui-monospace, Menlo, monospace; font-size: 11px; background: #ffe3e3; color: #c92a2a; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
/* 配送経路バッジ・送料未入力の赤セル・送料アラート */
.route-self { background: #fff0f6; color: #c2255c; border: 1px solid #fcc2d7; border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.route-fba { background: #e7f5ff; color: #1971c2; border: 1px solid #a5d8ff; border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.route-return { background: #ffe3e3; color: #c92a2a; border: 1px solid #ffa8a8; border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.ship-need { display: block; background: #ff6b6b; color: #fff; border-radius: 5px; padding: 3px 4px; font-size: 11px; font-weight: 800; text-align: center; white-space: nowrap; }
td:has(.ship-need) { background: #ffe3e3 !important; }
.stat.ship-alert { background: #fff5f5; border-color: #ffc9c9; min-width: 260px; }
.stat.ship-alert .n { color: #e03131; font-size: 18px; }
.stat.ship-alert .l { color: #c92a2a; }
.buyer-cards { display: flex; flex-wrap: wrap; gap: 12px; padding: 2px 0; }
/* 1行に2人ずつ（3人目以降は改行）。各カードの6ボックスは折り返さず横一列に収める */
.buyer-block { flex: 1 1 calc(50% - 6px); box-sizing: border-box; border: 2px solid #e9ecef; border-radius: 12px; padding: 10px 12px; }
.buyer-block .bb-boxes { flex-wrap: nowrap; }
.buyer-block .bb-box { flex: 1 1 0; min-width: 0; padding: 8px 6px; }
@media (max-width: 760px) {   /* スマホは1人/行＋ボックス折り返し可 */
  .buyer-block { flex: 1 1 100%; }
  .buyer-block .bb-boxes { flex-wrap: wrap; }
  .buyer-block .bb-box { flex: 1 1 80px; }
}
.buyer-block.p-pink { background: #fff0f6; border-color: #fcc2d7; }
.buyer-block.p-yellow { background: #fff9db; border-color: #ffe066; }
.buyer-block.p-green { background: #ebfbee; border-color: #b2f2bb; }
.buyer-block .bb-name { font-size: 15px; font-weight: 800; color: #1f2a44; margin-bottom: 8px; }
.buyer-block .bb-boxes { display: flex; flex-wrap: wrap; gap: 8px; }
/* メイン集計カードと同じく、ラベル(.l)を上・数値(.n)を下に */
.bb-box { flex: 1 1 90px; background: #fff; border: 1px solid #f1f3f5; border-radius: 8px; padding: 8px 10px;
  display: flex; flex-direction: column-reverse; justify-content: flex-end; align-items: center; }
.bb-box .n { font-size: 16px; font-weight: 800; color: #1f2a44; white-space: nowrap; }
.bb-box .l { font-size: 10px; color: #868e96; margin-bottom: 4px; }
.bb-box.bb-hl .n { color: #c2255c; }
/* 売上テーブル：報酬除外（Amazon以外の販売先）を強調 */
.sold-ex { background: #fff3bf; color: #b7791f; padding: 1px 6px; border-radius: 4px; font-weight: 700; font-size: 11px; }
/* 売上テーブル：金額〜利益率の列を青背景に */
td.grp-smoney { background: #eef6ff; }
th.grp-smoney { background: #d0e7ff; }
/* 売上：受注IDは全桁表示（隣の列にはみ出さないよう列幅で収める） */
.oid-text { font-variant-numeric: tabular-nums; }
td:has(.oid-text) { white-space: nowrap; }
/* 返品管理：処理状況 */
.ret-todo { background: #ffe3e3; color: #e03131; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.ret-done { background: #e6fcf5; color: #0ca678; padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.ret-status { border: none; border-radius: 10px; padding: 3px 10px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ret-status.ret-todo { background: #ffe3e3; color: #e03131; }
.ret-status.ret-done { background: #e6fcf5; color: #0ca678; }
.ret-status.ret-return { background: #ffe3e3; color: #c92a2a; border: 1px solid #ffa8a8; }   /* 返送在庫（クリックで返品処理） */
/* 処理状況ごとの色分け */
.ret-status.rs-todo    { background: #ffe3e3; color: #e03131; }   /* 未対応：赤 */
.ret-status.rs-inv     { background: #ffe8cc; color: #e8590c; }   /* 調査：オレンジ */
.ret-status.rs-listing { background: #d0ebff; color: #1971c2; }   /* フリマ出品中：青 */
.ret-status.rs-checking { background: #dbe4ff; color: #3b5bdb; }   /* 確認・処理中：インディゴ */
.ret-status.rs-back    { background: #f3d9fa; color: #9c36b5; }   /* 返送済み：紫 */
.ret-status.rs-relist  { background: #d3f9d8; color: #2b8a3e; }   /* 再出品：緑 */
.ret-status.rs-sold    { background: #c3fae8; color: #087f5b; }   /* フリマ売却済：ティール */
.ret-status.rs-damage  { background: #ffc9c9; color: #a61e4d; }   /* 破損：濃赤 */
.ret-status.rs-dispose { background: #e9ecef; color: #495057; }   /* 廃棄：グレー */
.ret-status:hover { filter: brightness(0.95); }
.stock-sell { border: none; border-radius: 10px; padding: 3px 10px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; background: #e6fcf5; color: #0ca678; }
.stock-sell:hover { filter: brightness(0.95); }
/* 在庫の「💥 紛失・破損」＝Amazonが倉庫で無くした/壊して補填された時。
   売れたわけではないので、💰売れた（緑）とは色を分ける。2段に積んで幅を取らない。 */
.stock-damage { display: block; margin: 4px auto 0; border: none; border-radius: 10px; padding: 3px 8px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; background: #fff0f0; color: #c92a2a; }
.stock-damage:hover { filter: brightness(0.96); }
.ret-actions { display: flex; flex-direction: column; gap: 8px; }
.ra-btn { text-align: left; padding: 12px 14px; border: 1px solid #dee2e6; border-radius: 10px; background: #fff; font-size: 14px; cursor: pointer; }
.ra-btn:hover { background: #f8f9fa; }
.ra-btn.ra-sell { border-color: #0ca678; color: #0b7a43; font-weight: 700; }
.ra-btn.ra-reset { color: #868e96; font-size: 13px; }
/* 処理状況の選択（選ぶだけ→保存で確定） */
.ra-select { display: flex; flex-wrap: wrap; gap: 6px; }
.ra-opt { padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; cursor: pointer; font-weight: 600; font-size: 13px; }
.ra-opt:hover { background: #f1f5f9; }
.ra-opt.ra-active { background: #c2255c; color: #fff; border-color: #c2255c; }
/* 在庫ビュー：経過日数バッジ（古いほど赤） */
.held-badge { display: inline-block; padding: 2px 7px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.held-badge.held-red { background: #ffe3e3; color: #e03131; }
.held-badge.held-orange { background: #ffec99; color: #e8590c; }
.held-badge.held-gray { background: #f1f3f5; color: #868e96; }
.sales-detail-pop { font-size: 13px; }
.sales-detail-pop .sd-name { font-size: 15px; font-weight: 700; color: #1f2a44; margin-bottom: 10px; line-height: 1.4; }
.sd-row { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px dashed #eee; }
.sd-l { width: 110px; flex-shrink: 0; color: #868e96; }
.sd-v { color: #1f2a44; word-break: break-all; }
.imp-result .imp-stats { display: flex; gap: 10px; margin-bottom: 12px; }
.imp-stat { flex: 1; background: #f8f9fa; border-radius: 8px; padding: 10px; text-align: center; }
.imp-stat .n { font-size: 22px; font-weight: 800; color: #1f2a44; }
.imp-stat .l { font-size: 11px; color: #868e96; margin-top: 2px; }
.imp-warn { background: #fff5f5; border: 1px solid #ffc9c9; border-radius: 8px; padding: 10px 12px; color: #c92a2a; }

/* ===== 別ウィンドウ：新規追加フォームだけ表示 ===== */
body.popup-add header,
body.popup-add #personHeading,
body.popup-add #stats,
body.popup-add .toolbar,
body.popup-add #moreFilters,
body.popup-add #grid,
body.popup-add #pager,
body.popup-add #count,
body.popup-add #hint { display: none !important; }
body.popup-add main { overflow: visible; max-height: none; margin: 0; padding: 0; }
body.popup-add #cards { display: block !important; }
.popup-add-wrap { max-width: 540px; margin: 0 auto; padding: 18px 18px 40px; }
.popup-add-h { font-size: 18px; color: #c2255c; margin: 6px 0 16px; }
.popup-add-h span { font-size: 13px; color: #888; font-weight: 400; }
.popup-add-actions { position: sticky; bottom: 0; background: #fff; padding: 12px 0 6px; margin-top: 10px; border-top: 1px solid #f1d3df; display: flex; align-items: center; gap: 12px; }
.popup-add-actions .primary { font-size: 15px; padding: 10px 20px; }
.popup-add-msg { color: #0b7a43; font-weight: 700; font-size: 13px; }

/* ===== 型番検索（仕入れ登録フォーム） ===== */
.model-search-results { margin-top: 4px; border: 1px solid #e3e8f0; border-radius: 8px; background: #fff; max-height: 260px; overflow-y: auto; }
.model-search-results:empty { display: none; }
.ms-loading, .ms-empty { padding: 10px 14px; color: #868e96; font-size: 13px; }
.ms-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f1f3f5; transition: background 0.1s; }
.ms-item:last-child { border-bottom: none; }
.ms-item:hover { background: #f8f0f5; }
.ms-img { width: 36px; height: 36px; object-fit: contain; border-radius: 4px; background: #f8f9fa; flex-shrink: 0; }
.ms-noimg { width: 36px; text-align: center; color: #ccc; flex-shrink: 0; }
.ms-info { flex: 1; min-width: 0; }
.ms-model { font-weight: 700; font-size: 13px; color: #1f2a44; }
.ms-name { font-size: 11px; color: #868e96; white-space: normal; word-break: break-word; line-height: 1.3; }
.ms-asin-badge { font-size: 11px; color: #c2255c; background: #fff5f7; border: 1px solid #f7c6da; border-radius: 4px; padding: 2px 6px; white-space: nowrap; flex-shrink: 0; }

/* ===== 送料計算ツール ===== */
.sc-wrap { font-size: 13px; }
.sc-note { background: #fff9ec; border: 1px solid #ffe066; border-radius: 6px; padding: 6px 12px; color: #856404; font-size: 12px; margin-bottom: 12px; }
.sc-controls { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sc-controls .fld { flex: 1; min-width: 140px; }
.sc-result { display: flex; gap: 12px; margin-top: 8px; }
.sc-carrier { border: 2px solid #ccc; border-radius: 10px; padding: 16px; flex: 1; text-align: center; }
.sc-carrier-name { font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.sc-price { font-size: 26px; font-weight: 800; color: #1f2a44; }
.sc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sc-table th, .sc-table td { border: 1px solid #e3e8f0; padding: 5px 8px; text-align: right; white-space: nowrap; }
.sc-table th { background: #f8f9fa; text-align: center; position: sticky; top: 0; }
.sc-table td:first-child { text-align: center; background: #f8f9fa; position: sticky; left: 0; }
.sc-full .sc-cell { padding: 5px 6px; line-height: 1.5; text-align: center; }
.sc-best { font-size: 11px; font-weight: 700; }
.sc-fullnote { font-size: 12px; color: #868e96; margin: 4px 0 8px; }
.sc-note-approx { background: #fff4e6; border-color: #ffd8a8; color: #b45309; }

/* ===== リサーチ管理（候補キュー） ===== */
/* 集計カード（売上ページと同じ .stat を流用）。即決GO=緑/入札可=黄で強調 */
.rq-statcards { padding: 4px 0 12px; }
.rq-stat-go { border-color: #40c057; }
.rq-stat-go .n { color: #2b8a3e; }
.rq-stat-bid { border-color: #f59f00; }
.rq-stat-bid .n { color: #e8590c; }
/* 当月 落札・落札率は赤枠で強調 */
.rq-stat-won { border-color: #e64980; border-width: 2px; }
.rq-stat-won .n { color: #c2255c; }
/* 年月セレクタ（カード型） */
.rq-month-card { flex-direction: column; align-items: flex-start; justify-content: center; }
.rq-month-card .l { margin-bottom: 6px; }
.rq-month-sel { font-size: 20px; font-weight: 700; color: #a61e5d; border: 1px solid #f7c6da; border-radius: 8px; padding: 4px 8px; background: #fff; }
/* 終了チップ */
.rq-stchip-end { border-color: #adb5bd; color: #495057; }
.rq-stchip-end.rq-stchip-on { background: #868e96; border-color: #868e96; color: #fff; }
/* ステータス別件数チップ（クリックで絞り込み） */
/* お知らせのすぐ下に詰まっていて窮屈だったので、上に間を空ける。
   折り返した時の行間も少し広げる。2026-10-08 くみ「ここもうすこしすぺーすあけられん？」 */
.rq-statuschips { display: flex; flex-wrap: wrap; gap: 12px 10px; margin: 18px 0 16px; }
.rq-stchip { background: #fff; border: 1.5px solid #dee2e6; border-radius: 22px; padding: 10px 20px; font-size: 15px; font-weight: 600; color: #495057; cursor: pointer; }
.rq-stchip b { color: #1f2a44; font-size: 18px; margin-left: 4px; }
.rq-stchip:hover { background: #f1f3f5; }
.rq-stchip-on { background: #c2255c; border-color: #c2255c; color: #fff; }
.rq-stchip-on b { color: #fff; }
.rq-stchip-exp { border-color: #f59f00; color: #b45309; }
.rq-stchip-exp.rq-stchip-on { background: #f59f00; border-color: #f59f00; color: #fff; }
.rq-stchip-go { border-color: #40c057; color: #2b8a3e; }
.rq-stchip-go.rq-stchip-on { background: #2b8a3e; border-color: #2b8a3e; color: #fff; }
.rq-stchip-go.rq-stchip-on b { color: #fff; }
.rq-stchip-bid { border-color: #f59f00; color: #b45309; }
.rq-stchip-bid.rq-stchip-on { background: #f59f00; border-color: #f59f00; color: #fff; }
.rq-stchip-bid.rq-stchip-on b { color: #fff; }
.rq-stchip-rec { border-color: #ff6b6b; color: #e03131; }
.rq-stchip-rec.rq-stchip-on { background: #ff6b6b; border-color: #ff6b6b; color: #fff; }
.rq-stchip-rec.rq-stchip-on b { color: #fff; }
/* 強化おすすめバッジ・一括見送りボタン */
.rq-recbadge { font-size: 10px; font-weight: 800; color: #fff; background: linear-gradient(90deg,#fa5252,#ff8787); padding: 2px 5px; border-radius: 4px; white-space: nowrap; }
/* 仕入れ強化おすすめの種類（リピート／重点）：控えめなグレーの小札 */
.rs-tag { font-size: 10px; color: #868e96; border: 1px solid #dee2e6; border-radius: 3px; padding: 0 4px; white-space: nowrap; }
/* ⏳時期待ち（季節オフ）：リサーチ行のバッジ・チップ */
.rq-waitbadge { font-size: 10px; font-weight: 800; color: #1864ab; background: #e7f5ff; border: 1px solid #a5d8ff; padding: 2px 5px; border-radius: 4px; white-space: nowrap; }
.rq-waitchip.rq-stchip-on { background: #e7f5ff; color: #1864ab; border-color: #a5d8ff; }
.rq-wait-btn { background: #e7f5ff; color: #1864ab; border: 1px solid #a5d8ff; border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: 12px; cursor: pointer; }
.rq-wait-btn:hover { background: #d0ebff; }
/* 商品リストの時期待ちバッジ（⏳待機中／🌱解禁） */
.new-badge { color: #0b7a43; font-weight: 800; }
.rq-mng { margin-top: 3px; font-size: 10.5px; font-weight: 800; color: #c92a2a;
  background: #fff5f5; border: 1px solid #ffc9c9; border-radius: 999px; padding: 1px 7px;
  display: inline-block; cursor: help; }
.rq-find { max-width: 760px; margin: 0 auto 16px; background: #f8f9fa; border: 1px solid #dee2e6;
  border-radius: 10px; padding: 12px 16px; font-size: 13px; color: #495057; font-weight: 700; }
.rq-find-b { margin-top: 6px; font-weight: 400; line-height: 1.9; }
.rq-find-b b { color: #1f2a44; }
.rq-find-b .filter-btn { margin-left: 6px; }
.rq-holdsoon { background: #fff4e6; border: 1px solid #ffc078; border-radius: 8px;
  padding: 9px 13px; margin: 0 0 10px; font-size: 13px; color: #b5710e; font-weight: 700; }
.rq-holdsoon button { margin-left: 8px; border: 1px solid #e8890c; background: #fff; color: #b5710e;
  border-radius: 6px; padding: 3px 14px; font-size: 12px; font-weight: 700; cursor: pointer; }
.rq-holdsoon button:hover { background: #ffe8cc; }
.ver-line { margin-top: 6px; font-size: 11.5px; color: #868e96; }
.ver-line b { color: #495057; font-family: ui-monospace, monospace; }
.ver-sub { margin-left: 10px; color: #adb5bd; }
.pending-banner { background: #fff0f6; border: 1px solid #fcc2d7; border-radius: 8px;
  padding: 8px 12px; margin-bottom: 8px; font-size: 13px; color: #a61e4d; font-weight: 700; }
.pending-banner button { margin-left: 8px; border: 1px solid #c2255c; background: #fff; color: #c2255c;
  border-radius: 6px; padding: 3px 14px; font-size: 12px; font-weight: 700; cursor: pointer; }
.pending-banner button:hover { background: #ffdeeb; }
.fld-hint { font-size: 11.5px; color: #777; line-height: 1.75; margin: -4px 0 10px; }
.fld-hint code { background: #f1f3f5; border-radius: 4px; padding: 1px 5px; font-size: 11px; }
.wait-badge { display: inline-block; font-size: 10px; font-weight: 800; color: #1864ab; background: #e7f5ff; border: 1px solid #a5d8ff; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.wait-badge.wait-open { color: #0b7a43; background: #e6fcf5; border-color: #63e6be; }
/* ダッシュボード：時期待ち解禁アラートはクリックで商品リストへ */
.alert-row.alert-wait { cursor: pointer; }
.alert-row.alert-wait:hover { background: #e6fcf5; }
.rq-bulk-btn { border-color: #ffc9c9 !important; color: #c92a2a !important; }
.rq-bulk-btn:hover { background: #fff5f5 !important; }
.rq-bulk-box { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px dashed #f3b9d2; border-radius: 9px; background: #fffafc; }
.rq-bulk-count { font-size: 12px; font-weight: 700; color: #a61e5d; white-space: nowrap; }
.rq-bulk-sel { padding: 6px 8px; border: 1px solid #f7c6da; border-radius: 8px; font-size: 12px; color: #495057; background: #fff; cursor: pointer; }
.rq-bulk-sel:disabled { color: #adb5bd; background: #f1f3f5; cursor: not-allowed; }
#rqBulkApply:disabled { color: #adb5bd; border-color: #e9ecef; cursor: not-allowed; }
/* フィルタ行：左寄せ */
.rq-filterbar { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
/* 入力欄はメインツールバーと同じ見た目に統一 */
.rq-filterbar input, .rq-filterbar select { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; background: #fff; }
/* CSV取込・マスタDLは右端へ */
.rq-fb-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.rq-stock-low { color: #c2255c; font-weight: 700; }
.rq-allchk { font-size: 12px; color: #666; display: flex; align-items: center; gap: 4px; }
.rq-empty { padding: 50px; text-align: center; color: #868e96; background: #f8f9fa; border-radius: 10px; }
.rq-wrap { overflow: auto; max-height: calc(100vh - 250px); border: 1px solid #e9ecef; border-radius: 10px; }
/* 21列：終了日/画像/ASIN/商品名/型番/メーカー/ジャンル/ランキング/現在庫/ヤフオクID/ヤフオク商品名/中古最安/仕入基準/現在/即決/送料/入札上限/付属品/仕入れURL/Amazon/ステータス */
.rq-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; background: #fff; }
.rq-table thead th { position: sticky; top: 0; z-index: 2; background: #eef2f8; font-size: 11px; color: #343a40; font-weight: 700; text-align: center; padding: 8px 6px; border-bottom: 2px solid #dde3ec; white-space: nowrap; }
.rq-table th.rq-sortable:hover { background: #e2e9f3; color: #495057; }
/* 列の幅。★「何番目か」ではなく列ごとのクラスで指定すること★
   位置(nth-child)で書くと、間に列を1つ足しただけで以降の幅が全部ズレる。 */
.rq-table th:nth-child(1)  { width: 38px; }   /* チェックボックス（先頭固定なので位置でよい） */
.rq-table th.rq-col-end_time   { width: 76px; }
.rq-table th.rq-col-image      { width: 44px; }
.rq-table th.rq-col-asin       { width: 110px; }
.rq-table th.rq-col-name       { width: 200px; }
.rq-table th.rq-col-model      { width: 100px; }
.rq-table th.rq-col-maker      { width: 100px; }
.rq-table th.rq-col-genre      { width: 90px; }
.rq-table th.rq-col-rank       { width: 84px; }
.rq-table th.rq-col-stock      { width: 60px; }
/* 仕入れ登録フォーム上部の見込み利益プレビュー */
.f-profit-preview { margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; font-size: 15px; font-weight: 700; }
.f-profit-preview b { font-size: 19px; }
.f-profit-preview.pp-ok { background: #ebfbf1; color: #0b7a43; border: 1px solid #63d8a0; }
.f-profit-preview.pp-ng { background: #fff3f3; color: #c92a2a; border: 1px solid #ffa8a8; }
.f-profit-preview .pp-sub { font-size: 12px; font-weight: 400; color: #666; margin-left: 10px; }
/* 手数料の内訳（計算が実際と合わない時の原因さがし用） */
.f-profit-preview .pp-fee { display: block; font-size: 11.5px; font-weight: 400; color: #777; margin-top: 5px; line-height: 1.6; }
.rq-table th.rq-col-yahoo_id { width: 130px; }   /* 出品ID（12桁が1行に収まる幅） */
.rq-table td.rq-col-yahoo_id { white-space: normal; word-break: break-all; }
.rq-idtxt { word-break: break-all; }
.rq-table th.rq-col-title { width: 320px; }   /* 出品タイトル（広め） */
.rq-table th.rq-col-used_min    { width: 78px; }
.rq-table th.rq-col-used_avg90  { width: 78px; }
.rq-table th.rq-col-buy_std     { width: 78px; }
.rq-table th.rq-col-price       { width: 78px; }
.rq-table th.rq-col-buynow      { width: 72px; }
.rq-table th.rq-col-shipping    { width: 104px; }  /* 下にサイズ・送料めやすを出すので広め */
.rq-table th.rq-col-extra       { width: 86px; }   /* 別途仕入れ（金額を打つだけ） */
.rq-table th.rq-col-bid_max     { width: 80px; }
.rq-table th.rq-col-accessories { width: 180px; }  /* 入力するので広め */
.rq-table th.rq-col-yahoo_url   { width: 80px; }
.rq-table th.rq-col-amazon_url  { width: 80px; }
.rq-table th.rq-col-status      { width: 190px; }  /* 仕分けモードの大ボタン幅 */
.rq-table th.rq-col-researcher  { width: 96px; }
.rq-chk-col { text-align: center; }
.rq-chk-col input { width: 17px; height: 17px; cursor: pointer; }
.rq-row-sel { background: #fff0f6 !important; }
.rq-row-sel td { background: #fff0f6 !important; }
.rq-table td { padding: 7px 6px; border-bottom: 1px solid #ced4da; vertical-align: top; }
.rq-c { text-align: center; white-space: nowrap; }
.rq-c b { color: #1f2a44; }
.rq-mono { font-size: 12px; color: #495057; white-space: nowrap; }
.rq-modelcell { font-size: 12px; color: #495057; white-space: normal; word-break: break-word; line-height: 1.35; }
/* ASIN列。左の固定列は幅が決まっている(158px→268px＝110px)ので、はみ出すと
   次の列に隠れてコピー・✎（ASIN張り替え）が押せなくなる。折り返して2行にする。 */
.rq-asincell { font-size: 12px; color: #495057; text-align: center;
  white-space: normal; word-break: break-all; line-height: 1.5;
  width: 110px; min-width: 110px; max-width: 110px; }
.rq-asinval { display: inline-block; }
/* 自動で「落札」になった候補の印。押した覚えがない時に理由を出す */
.rq-autowon { margin-left: 6px; padding: 1px 6px; border-radius: 999px; cursor: help;
  background: #fff3bf; color: #a5761a; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.rq-asincell .copy-val, .rq-asincell .rq-asin-edit, .rq-asincell .rq-stockskip { margin-left: 3px; }
.rq-stockskip { opacity: .55; }
.rq-stockskip.on { opacity: 1; background: #fff4e6; border-color: #ffa94d; }
.rq-chip-sep { display: inline-block; width: 1px; align-self: stretch; background: #dee2e6; margin: 0 4px; }
.rq-img { width: 38px; height: 38px; object-fit: contain; border-radius: 4px; background: #f8f9fa; display: block; margin: 0 auto; }
.rq-name { line-height: 1.4; white-space: normal; word-break: break-word; }
.rq-name b { color: #1f2a44; }
.rq-ytitle { font-size: 13px; color: #495057; white-space: normal; word-break: break-word; line-height: 1.45; }
/* 仕入れ元バッジ（出品タイトルの先頭に表示） */
.rq-src { display: inline-block; font-size: 10px; font-weight: 800; color: #fff; padding: 1px 5px; border-radius: 4px; margin-right: 5px; vertical-align: 1px; white-space: nowrap; }
.rq-src.src-yahoo { background: #ff7a00; }      /* ヤフオク＝オレンジ */
.rq-src.src-mercari { background: #ea352d; }    /* メルカリ＝赤 */
.rq-src.src-paypay { background: #e60012; }     /* PayPayフリマ＝赤 */
.rq-src.src-rakuma { background: #8e44ad; }     /* ラクマ＝紫 */
.rq-mm { margin-left: 6px; font-size: 11px; color: #7048e8; background: #f3f0ff; border-radius: 8px; padding: 1px 6px; cursor: help; }
/* 仕入れ元（プラットフォーム）絞り込みチップ */
.rq-platchips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 14px; }
.rq-plat-label { font-size: 12px; font-weight: 800; color: #868e96; margin-right: 2px; }
.rq-platchip { padding: 5px 13px; border-radius: 15px; border: 1.5px solid #dee2e6; background: #fff; color: #495057; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.rq-platchip b { margin-left: 3px; color: inherit; }
.rq-platchip:hover { border-color: #adb5bd; }
.rq-platchip.all.on { background: #c2255c; color: #fff; border-color: #c2255c; }
.rq-platchip.yahoo.on { background: #ff7a00; color: #fff; border-color: #ff7a00; }
.rq-platchip.mercari.on { background: #ea352d; color: #fff; border-color: #ea352d; }
.rq-platchip.paypay.on { background: #e60012; color: #fff; border-color: #e60012; }
.rq-platchip.rakuma.on { background: #8e44ad; color: #fff; border-color: #8e44ad; }
.rq-rank-bad { color: #ae3ec9; }   /* ランキング20万位超は紫で注意 */
.rq-acc { font-size: 11px; color: #5c3a1e; white-space: normal; word-break: break-word; line-height: 1.4; }
/* グループ色分け：a=商品情報(青) / b=ヤフオク(クリーム) / c=価格判断(緑) / d=操作(無地) */
.rq-table th.rq-ga { background: #e7eef7; }
.rq-table th.rq-gb { background: #f3ecd9; }
.rq-table th.rq-gc { background: #e3f1e6; }
.rq-table th.rq-gd { background: #eef2f8; }
.rq-table td.rq-ga { background: #f6f9fd; }
.rq-table td.rq-gb { background: #fdfbf4; }
.rq-table td.rq-gc { background: #f5fbf6; }
.rq-table td.rq-gd { background: #ffffff; }
/* e=マスタ相場（中古最安・仕入基準）＝紫系で判断材料を区別 */
.rq-table th.rq-ge { background: #e7def0; }
.rq-table td.rq-ge { background: #f4eefb; }
/* グループ境界の区切り線 */
.rq-table th.rq-gsep, .rq-table td.rq-gsep { border-left: 2px solid #c5cdd8; }
/* リサーチ表：チェック列＋終了日〜現在庫を横スクロールで固定（左に貼り付く） */
.rq-table th.rq-freeze, .rq-table td.rq-freeze { position: sticky; }
.rq-table td.rq-freeze { z-index: 3; }
.rq-table thead th.rq-freeze { z-index: 5; }
.rq-table td.rq-chk-col { background: #f6f9fd; }
.rq-table .rq-freeze:nth-child(1)  { left: 0; }
.rq-table .rq-freeze:nth-child(2)  { left: 38px; }
.rq-table .rq-freeze:nth-child(3)  { left: 114px; }
.rq-table .rq-freeze:nth-child(4)  { left: 158px; }
.rq-table .rq-freeze:nth-child(5)  { left: 268px; }
.rq-table .rq-freeze:nth-child(6)  { left: 468px; }
.rq-table .rq-freeze:nth-child(7)  { left: 568px; }
.rq-table .rq-freeze:nth-child(8)  { left: 668px; }
.rq-table .rq-freeze:nth-child(9)  { left: 758px; }
.rq-table .rq-freeze:nth-child(10) { left: 842px; box-shadow: 2px 0 5px rgba(0,0,0,0.07); }
/* リサーチ 仕分けモード：大ボタン */
.rq-sortmode-on { background: #0ca678 !important; color: #fff !important; border-color: #0ca678 !important; }
.rq-sortcell { width: 190px; max-width: 190px; white-space: normal; }
.rq-sort-actions { display: flex; flex-direction: column; gap: 3px; align-items: stretch; min-width: 0; }
.rq-sort-actions button { white-space: normal; word-break: break-word; }
.rq-bid-btn, .rq-hold-btn, .rq-skip-btn, .rq-dup-btn, .rq-owari-btn, .rq-rakusatsu-btn { padding: 5px 6px; border-radius: 8px; font-weight: 800; font-size: 12px; cursor: pointer; border: 1.5px solid; }
.rq-owari-btn { background: #f1f3f5; color: #495057; border-color: #ced4da; }
.rq-owari-btn:hover { background: #868e96; color: #fff; }
.rq-lose-btn { padding: 8px 6px; border-radius: 8px; font-weight: 800; font-size: 13px; cursor: pointer; border: 1.5px solid; background: #fff4e6; color: #b5710e; border-color: #f0b878; }
.rq-lose-btn:hover { background: #b5710e; color: #fff; }
.rq-bidded-btn { padding: 5px 6px; border-radius: 8px; font-weight: 800; font-size: 12px; cursor: pointer; border: 1.5px solid; background: #e7f0ff; color: #1c56c2; border-color: #9dbff5; }
.rq-bidded-btn:hover { background: #1c56c2; color: #fff; }
.master-buy-btn { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 1.3; cursor: pointer; background: #fff0f6; color: #c2255c; border: 1px solid #f7a8c9; white-space: nowrap; }
.master-buy-btn:hover { background: #c2255c; color: #fff; }
.rq-rakusatsu-btn { background: #fff0f6; color: #c2255c; border-color: #f7a8c9; margin-top: 2px; }
.rq-rakusatsu-btn:hover { background: #c2255c; color: #fff; }
.rq-bid-btn { background: #ebfbf1; color: #0b7a43; border-color: #63d8a0; }
.rq-bid-btn:hover { background: #0ca678; color: #fff; }
.rq-skip-btn { background: #fff3f3; color: #c92a2a; border-color: #ffa8a8; }
.rq-skip-btn:hover { background: #e03131; color: #fff; }
.rq-dup-btn { background: #fff8ec; color: #b5710e; border-color: #e8b86d; }
.rq-dup-btn:hover { background: #e8a53a; color: #fff; }
.rq-hold-btn { background: #f3f0ff; color: #6741a8; border-color: #b197e0; }   /* 保留＝紫（消えない一時避け） */
.rq-hold-btn:hover { background: #7048e8; color: #fff; }
.rq-cur-status { font-size: 11px; color: #868e96; margin-top: 3px; white-space: normal; word-break: break-word; line-height: 1.45; text-align: left; }
/* 外注リサーチ実績パネル */
.rq-researcher-stats { margin: 8px 0 4px; padding: 10px 12px; background: #f4eefb; border: 1px solid #e0d3f0; border-radius: 10px; width: fit-content; max-width: 100%; }
.rq-rs-head { font-weight: 800; color: #6741a8; font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.rq-rs-head select { padding: 6px 10px; border: 1px solid #d0bdec; border-radius: 6px; font-size: 14px; }
.rq-rs-table { border-collapse: collapse; font-size: 17px; background: #fff; border-radius: 8px; overflow: hidden; width: auto; min-width: 0; table-layout: auto; }
.rq-rs-table th, .rq-rs-table td { border: 1px solid #ece3f6; padding: 12px 30px; text-align: center; font-size: 17px; }
.rq-rs-table th { background: #efe6fa; color: #6741a8; font-size: 15px; }
.rq-rs-table td b { font-size: 21px; }
.rq-rs-table td:first-child, .rq-rs-table th:first-child { text-align: left; font-weight: 700; }
/* 日ごとの仕分け点数（久美さんだけ）。
   2026-10-05 くみ「リサーチ外注がデイリー何点やってるかわかるようにできる？」 */
.rsd-h { font-weight: 800; color: #6741a8; font-size: 15px; margin: 16px 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rsd-only { font-size: 11px; font-weight: 700; color: #8a6fc0; background: #fff; border: 1px solid #d9c9f0; border-radius: 999px; padding: 2px 9px; }
.rsd-wrap { max-height: 340px; overflow: auto; border-radius: 8px; background: #fff; width: fit-content; max-width: 100%; }
.rsd-tbl { font-size: 15px; overflow: visible; }
.rsd-tbl th, .rsd-tbl td { padding: 7px 16px; font-size: 15px; }
.rsd-tbl thead th { position: sticky; top: 0; z-index: 1; }
.rsd-tbl td b { font-size: 17px; }
.rsd-day { white-space: nowrap; font-weight: 700; }
.rsd-w { font-size: 11px; color: #868e96; margin-left: 5px; font-weight: 400; }
.rsd-sat { background: #f1f5ff; }
.rsd-sun { background: #fff1f1; }
.rsd-zero { color: #ced4da; }
/* 📨質問中（まだ点数前）。2026-10-08 くみ「確認中はカウントしないでよ」 */
.rq-rs-table .rs-asking { color: #1864ab; font-weight: 700; }
.rq-rs-table .rs-zero { color: #ced4da; }
/* 数字の下に敷く細い棒。背景を塗ると隣の列とくっついて「崩れ」に見えたため、
   枠の中に入れて左右を離す。2026-10-05 くみ「崩れかと思ったｗ」 */
.rsd-c { display: flex; flex-direction: column; gap: 5px; }
.rsd-v { line-height: 1.1; }
.rsd-bar { display: block; height: 5px; border-radius: 3px; background: #f0eaf8; overflow: hidden; }
.rsd-bar i { display: block; height: 100%; border-radius: 3px; background: #9775d6; }
.rsd-tot { background: #faf7fe; }
.rsd-f td { background: #f4eefb; font-weight: 700; border-top: 2px solid #d0bdec; }
.rsd-f2 td { border-top: 1px solid #e0d3f0; font-weight: 400; }
.rsd-d { font-size: 11px; color: #868e96; }
/* リサーチ料集計：中古OK＝支払う分、NG＝払わない分、を色で分ける。
   2026-09-04 くみ「OKとNGでわけたいです。NGには報酬払いませんので」 */
.mas-tbl th, .mas-tbl td { padding: 10px 18px; }
.mas-tbl .mas-pay { color: #0b7a43; }
.mas-tbl th.mas-pay { background: #e6f7ee; color: #0b7a43; }
.mas-tbl .mas-ng, .mas-tbl .mas-pend { color: #868e96; }
.mas-tbl tr.mas-total td { background: #faf7fe; font-weight: 700; }
.mas-tbl tr.mas-total .mas-pay b { font-size: 24px; }
/* 即決GO/入札可の行は左端に色帯（背景はグループ色を優先） */
.rq-row.rq-go td:first-child { box-shadow: inset 4px 0 0 #2b8a3e; }
.rq-row.rq-bid td:first-child { box-shadow: inset 4px 0 0 #f59f00; }
.rq-row.rq-ng td:first-child { box-shadow: inset 4px 0 0 #e03131; }   /* 予算オーバー＝赤帯 */
.rq-c b.rq-over { color: #e03131; }   /* 現在価格が入札上限超え（.rq-c b より詳細度を上げる） */
.rq-bidmax { color: #2b8a3e; font-weight: 700; }
/* 付属品は長くなるので、縦に伸ばして全部見えるようにする。
   2026-10-08 くみ「この付属品入れるところ、縦にのばせんか？？？」
   角をつまんで、さらに縦に伸ばすこともできる（resize: vertical）。 */
.rq-accin { width: 100%; min-width: 150px; padding: 5px 6px; border: 1px solid #ced4da;
  border-radius: 5px; font-size: 11px; line-height: 1.5; background: #fff;
  min-height: 54px; resize: vertical; font-family: inherit; }
.rq-end { font-size: 11px; color: #e8590c; }
/* 送料セル：入力欄の「下」にサイズボタンを縦に並べる（横に並ぶと隣の列にはみ出すため） */
.rq-shipcell { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.rq-ship { width: 100%; max-width: 92px; margin: 0 auto; padding: 4px; border: 1px solid #ced4da; border-radius: 5px; font-size: 12px; text-align: right; }
.rq-extra { width: 100%; max-width: 74px; padding: 4px; border: 1px solid #ced4da; border-radius: 5px; font-size: 12px; text-align: right; }
.rq-table .single-link { display: inline-block; }
.rq-status { width: 100%; padding: 4px; border: 1px solid #ced4da; border-radius: 5px; font-size: 12px; }

/* 着払送料セル（クリックで編集） */
.chaku-edit { cursor: pointer; display: inline-block; padding: 2px 4px; border-radius: 4px; }
.chaku-edit:hover { background: #fff3bf; }
.chaku-pen { color: #adb5bd; font-size: 11px; }

/* 商品の変更履歴 */
.hist-details { margin-top: 12px; border-top: 1px solid #eee; padding-top: 8px; }
.hist-details summary { cursor: pointer; font-size: 13px; font-weight: 700; color: #495057; }
.hist-box { margin-top: 8px; max-height: 240px; overflow-y: auto; }
.hist-empty { font-size: 12px; color: #868e96; }
.hist-row { border-left: 3px solid #dee2e6; padding: 4px 10px; margin-bottom: 8px; }
.hist-meta { font-size: 11px; color: #868e96; margin-bottom: 2px; }
.hist-chg { font-size: 12px; color: #1f2a44; line-height: 1.5; }
.hist-f { color: #868e96; }

/* 損益分岐ズレ警告 */
.be-warn { color: #e8590c; cursor: help; }
.be-warn-msg { background: #fff4e6; border: 1px solid #ffd8a8; border-radius: 6px; padding: 6px 10px; margin-top: 6px; font-size: 12px; color: #b45309; line-height: 1.5; }

/* 自己発送の返品 登録モーダル */
.ar-results { margin-top: 10px; max-height: 360px; overflow-y: auto; }
.ar-hint { padding: 16px; text-align: center; color: #868e96; font-size: 13px; }
.ar-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid #f1f3f5; }
.ar-img { width: 44px; height: 44px; object-fit: contain; border-radius: 4px; background: #f8f9fa; flex-shrink: 0; }
.ar-noimg { display: flex; align-items: center; justify-content: center; color: #ccc; }
.ar-info { flex: 1; min-width: 0; }
.ar-name { font-size: 13px; font-weight: 700; color: #1f2a44; white-space: normal; word-break: break-word; }
.ar-meta { font-size: 11px; color: #868e96; margin-top: 2px; }
.ar-mark { flex-shrink: 0; background: #fff; color: #c92a2a; border: 1px solid #ffa8a8; padding: 6px 12px; font-size: 12px; border-radius: 6px; cursor: pointer; }
.ar-mark:hover { background: #fff5f5; }

/* ダッシュボードの当月売上カード */
.dash-section-label { font-size: 14px; font-weight: 700; color: #a61e5d; margin: 6px 0 4px; }
.dash-sales { padding: 0 0 6px; }
/* 先月比・前年比バッジ */
.cmp-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.cmp { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.cmp-up { background: #ebfbf1; color: #0b7a43; }
.cmp-down { background: #fff3f3; color: #c92a2a; }
.cmp-flat { background: #eef2f8; color: #495057; }
.cmp-na { background: #f1f3f5; color: #adb5bd; }

/* リサーチ：描画上限の「さらに表示」バー（終了8,500件などを一度に描くと固まるため） */
.rq-more { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-top: 8px;
  background: #fff; border: 1px solid #f1dde5; border-radius: 10px; font-size: 12px; color: #666; }
.rq-more button { font-size: 12px; }
/* チップを選んだまま検索した時、ほかのステータスにもある、の知らせ */
.rq-otherst { background: #e7f5ff; border-color: #a5d8ff; color: #1864ab; }

/* 仕入れ：📅日別ポップアップの表 */
.bd-sum { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #555;
  background: #faf5ff; border: 1px solid #e9dcf7; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.bd-sum b { color: #6741a8; font-size: 14px; }
.bd-wrap { max-height: 56vh; overflow: auto; border: 1px solid #eee; border-radius: 8px; }
.bd-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.bd-table th { position: sticky; top: 0; background: #f4eefb; color: #4b3869; font-weight: 700;
  padding: 7px 10px; white-space: nowrap; border-bottom: 1px solid #e9dcf7; z-index: 1; }
.bd-table td { padding: 6px 10px; border-bottom: 1px solid #f4f4f6; white-space: nowrap; }
.bd-table tfoot td { position: sticky; bottom: 0; background: #f8f9fa; font-weight: 800; border-top: 1.5px solid #dee2e6; }
.bd-d { text-align: left; }
.bd-n { text-align: right; }
.bd-wd { font-size: 10px; color: #adb5bd; margin-left: 5px; }
.bd-wd.bd-sat { color: #1971c2; }
.bd-wd.bd-sun { color: #e03131; }
/* 日別ポップアップ：対象月セレクタ行と、仕入れが無かった日の行 */
.bd-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; font-size: 12px; color: #555; }
.bd-head select { font-size: 14px; padding: 4px 8px; }
.bd-sum-inline { color: #555; }
.bd-sum-inline b { color: #6741a8; font-size: 14px; }
.bd-table tr.bd-we td { background: #fafafa; }
.bd-table tr.bd-zero td { color: #c8ccd0; background: #fdfdfd; }

/* 📊 月次売上レポート */
.dash-report-bar { margin: 0 20px 12px; padding: 12px 16px; background: #fff; border: 1px solid #e9dcf7;
  border-radius: 10px; font-size: 13px; font-weight: 700; color: #6741a8; cursor: pointer; }
.dash-report-bar:hover { background: #faf5ff; }
.dash-report-bar.mr-new { background: #f4eefb; border-color: #b197dd; box-shadow: 0 2px 8px rgba(103,65,168,.18); }
.mr-up { color: #0b7a43; font-weight: 800; }
.mr-down { color: #e03131; font-weight: 800; }
.mr-base { color: #999; font-size: 11px; }
.mr-sec { font-size: 13px; font-weight: 800; color: #4b3869; margin: 14px 0 6px; }
.mr-sec.mr-warn { color: #c92a2a; }
.mr-genre { display: inline-block; margin-left: 6px; font-size: 10px; color: #868e96; background: #f1f3f5; border-radius: 6px; padding: 1px 5px; }
/* 商品名は「メーカー ジャンル 型番」表示。切れないよう折り返す */
.mr-name { display: inline; overflow-wrap: anywhere; }
/* レポートの商品/ジャンル表：固定レイアウト＝長い商品名が数値列に重ならない */
.mr-items { table-layout: fixed; }
.mr-items th:nth-child(1), .mr-items td:nth-child(1) { width: 36%; }
.mr-items th:nth-child(2), .mr-items td:nth-child(2) { width: 9%; }
.mr-items th:nth-child(3), .mr-items td:nth-child(3) { width: 17%; }
.mr-items th:nth-child(4), .mr-items td:nth-child(4) { width: 17%; }
.mr-items th:nth-child(5), .mr-items td:nth-child(5) { width: 12%; }
.mr-items th:nth-child(6), .mr-items td:nth-child(6) { width: 9%; }
.mr-items td { overflow: hidden; text-overflow: ellipsis; }
.mr-items td.bd-d { white-space: normal; line-height: 1.4; }
/* レポート：報告用テキストの折りたたみ */
.mr-copy { margin: 12px 0 4px; background: #faf5ff; border: 1px solid #e9dcf7; border-radius: 8px; padding: 8px 12px; }
.mr-copy summary { font-size: 12px; font-weight: 700; color: #6741a8; cursor: pointer; }

/* リサーチ：仕分け担当列（久美のみ表示） */
.rq-gf { background: #f4eefb; }
.rq-who { display: inline-block; font-size: 11px; font-weight: 700; color: #6741a8; background: #f4eefb; border: 1px solid #d0bdec; border-radius: 8px; padding: 1px 7px; white-space: nowrap; }
.rq-who-d { font-size: 9px; color: #adb5bd; margin-top: 2px; }
/* リサーチ：仕分け列は最小幅（余白は他列へ） */
.rq-table th.rq-gf, .rq-table td.rq-gf { width: 60px; min-width: 54px; max-width: 80px; white-space: normal; padding-left: 4px; padding-right: 4px; }
.rq-gf .rq-who { font-size: 10px; padding: 1px 5px; }

/* リサーチ：ASIN差し替えピッカー（型番でも探せる） */
.hint-sm { font-size: 11px; color: #868e96; margin-top: 4px; }
.ap-list { margin-top: 10px; max-height: 52vh; overflow-y: auto; border: 1px solid #e9ecef; border-radius: 8px; }
.ap-empty { padding: 14px; font-size: 12px; color: #868e96; text-align: center; }
.ap-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-bottom: 1px solid #f1f3f5; cursor: pointer; }
.ap-row:last-child { border-bottom: none; }
.ap-row:hover { background: #fff0f6; }
.ap-row img, .ap-noimg { width: 44px; height: 44px; object-fit: contain; border-radius: 5px; background: #f8f9fa; flex: none; }
.ap-txt { min-width: 0; font-size: 12px; line-height: 1.45; }
.ap-txt b { color: #1f2a44; }
.ap-asin { font-size: 11px; color: #868e96; margin-left: 6px; }
.ap-sub { font-size: 11px; color: #868e96; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-ng { font-size: 10px; color: #c92a2a; background: #fff0f0; border: 1px solid #ffc9c9; border-radius: 5px; padding: 0 5px; margin-left: 5px; }
.ap-now { font-size: 10px; color: #0b7a43; background: #ebfbee; border: 1px solid #8ce99a; border-radius: 5px; padding: 0 5px; margin-left: 5px; }
.ap-cur { background: #f8fff9; }
.ap-direct { background: #fffbf0; }
.rq-holdby { display: inline-block; margin: 2px 0 0 5px; font-size: 10px; color: #6741a8; background: #f4eefb; border: 1px solid #d0bdec; border-radius: 5px; padding: 0 5px; }
/* リサーチ：送料のめやす（サイズ区分から自動算出。空欄でもこの額で入札上限を計算） */
.rq-sizebtn { width: 100%; max-width: 92px; margin: 0 auto; font-size: 10px; font-weight: 700; line-height: 1.2; color: #6741a8;
  background: #f4eefb; border: 1px solid #d0bdec; border-radius: 5px; padding: 3px 2px; cursor: pointer; white-space: nowrap; }
.rq-sizebtn:hover { background: #ece3f7; border-color: #b197d6; }
/* リサーチ：仕入れ対象外（基準オーバー／海外版）の印。※.rq-over は現在価格の色分けで既に使用中のため別名 */
.rq-ngmark { display: inline-block; margin-right: 5px; font-size: 10px; font-weight: 700; color: #c92a2a; background: #fff0f0; border: 1px solid #ffc9c9; border-radius: 5px; padding: 1px 5px; }
/* 判定バッジ（🟢即決OK / 🟡入札可 / 🔴基準オーバー）＝現在価格の左に出す。行の左端の細い帯だけでは見えないため */
.rq-jb { display: inline-block; margin-right: 4px; font-size: 11px; vertical-align: middle; }
.rq-row.rq-ng td.rq-pricecell { background: #fff5f5 !important; }
.rq-row.rq-go td.rq-pricecell { background: #f3fbf5 !important; }
.rq-row.rq-bid td.rq-pricecell { background: #fffaf0 !important; }
/* リサーチ：同時作業のバッティング通知 */
.rq-toast { position: fixed; right: 18px; bottom: 18px; z-index: 9999; max-width: 380px; padding: 12px 15px;
  background: #fff4e6; border: 2px solid #f59f00; border-radius: 10px; color: #8a5a00; font-size: 13px; line-height: 1.55;
  font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.18); cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .18s, transform .18s; }
.rq-toast.on { opacity: 1; transform: translateY(0); pointer-events: auto; }
.sc-preset { margin: 0 0 10px; padding: 9px 12px; background: #f4eefb; border: 1px solid #d0bdec; border-radius: 8px; font-size: 12.5px; color: #6741a8; line-height: 1.5; }
/* 📖マニュアルタブのFAQ：質問4：答え6 */
.man-faq { table-layout: fixed; }
.man-faq th:nth-child(1), .man-faq td:nth-child(1) { width: 40%; }
.man-faq th:nth-child(2), .man-faq td:nth-child(2) { width: 60%; }
/* 送料計算：着先は倉庫（石川県＝北陸）が既定。変更も可能 */
.sc-default { border-color: #d0bdec !important; background: #f9f6fd; font-weight: 700; color: #6741a8; }
.sc-hint { font-size: 10px; color: #9b86bb; margin-top: 3px; }

/* リサーチ：今のステータスのボタンを塗りつぶす（小さい「現在：〜」だけでは分かりづらいため） */
.rq-sort-actions button.on { color: #fff !important; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.rq-sort-actions button.on::after { content: " ✓"; font-weight: 900; }
.rq-bid-btn.on { background: #0ca678; border-color: #0ca678; }
.rq-hold-btn.on { background: #7048e8; border-color: #7048e8; }
.rq-skip-btn.on { background: #e03131; border-color: #e03131; }
.rq-dup-btn.on { background: #e8a53a; border-color: #e8a53a; }
.rq-wait-btn.on { background: #1864ab; border-color: #1864ab; }
.rq-owari-btn.on { background: #868e96; border-color: #868e96; }
.rq-bidded-btn.on { background: #1c56c2; border-color: #1c56c2; }
.rq-rakusatsu-btn.on { background: #c2255c; border-color: #c2255c; }

/* 型番の重複整理（同じ型番が複数ASIN＝Amazonにカタログが複数ある商品） */
.dup-wrap { max-height: 66vh; overflow-y: auto; }
.dup-note { background: #fff9db; border: 1px solid #ffe066; border-radius: 10px; padding: 11px 14px; font-size: 12.5px; line-height: 1.65; margin-bottom: 12px; }
.dup-empty { padding: 24px; text-align: center; color: #868e96; font-size: 13px; }
.dup-g { border: 1px solid #e9ecef; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: #fff; }
.dup-g.dup-done { opacity: .5; }
.dup-h { font-weight: 800; font-size: 14px; color: #1f2a44; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dup-gap { font-size: 10px; font-weight: 700; color: #c92a2a; background: #fff0f0; border: 1px solid #ffc9c9; border-radius: 5px; padding: 2px 7px; }
.dup-ok { font-size: 10px; font-weight: 700; color: #0b7a43; background: #ebfbf1; border: 1px solid #8ce99a; border-radius: 5px; padding: 2px 7px; }
.dup-both { font-size: 10px; font-weight: 700; color: #b5710e; background: #fff8ec; border: 1px solid #e8b86d; border-radius: 5px; padding: 2px 7px; }
.dup-none { font-size: 10px; font-weight: 700; color: #868e96; background: #f1f3f5; border: 1px solid #ced4da; border-radius: 5px; padding: 2px 7px; }
.dup-r { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid #f1f3f5; border-radius: 9px; margin: 5px 0; cursor: pointer; }
.dup-r:hover { background: #fff0f6; }
.dup-r input { margin-top: 3px; width: 17px; height: 17px; flex: none; cursor: pointer; }
.dup-r img, .dup-noimg { width: 42px; height: 42px; object-fit: contain; border-radius: 5px; background: #f8f9fa; flex: none; }
.dup-t { min-width: 0; font-size: 12px; line-height: 1.55; }
.dup-t b { color: #1f2a44; }
.dup-n { display: inline-block; margin-left: 8px; font-size: 11px; color: #adb5bd; }
.dup-n.has { color: #0b7a43; font-weight: 700; }
.dup-p { display: block; font-size: 11.5px; color: #495057; }
.dup-name { display: block; font-size: 11px; color: #868e96; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dup-act { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.dup-btn { background: #5c3a1e; color: #fff; border: none; border-radius: 8px; padding: 7px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.dup-btn:hover { background: #7a4f29; }
.dup-btn:disabled { background: #ced4da; cursor: default; }
.dup-msg { font-size: 12px; color: #868e96; }
/* リサーチ：紛らわしい型番の警告（例：FI-IX1500 に対する FI-IX1500SE） */
/* 型番を商品リストの正しい商品に付け替えた印（元の型番を残す） */
.rq-fixed { margin-top: 3px; font-size: 10px; font-weight: 700; color: #1864ab; background: #e7f5ff; border: 1px solid #a5d8ff; border-radius: 5px; padding: 1px 5px; display: inline-block; line-height: 1.5; }
.rq-fixedman { color: #2b8a3e; background: #ebfbee; border-color: #b2f2bb; }
.rq-cfmark { display: inline-block; margin-right: 5px; font-size: 10px; font-weight: 800; color: #8a5a00; background: #fff4e6; border: 1px solid #ffd8a8; border-radius: 5px; padding: 1px 5px; }

/* 在庫数クリック → 在庫のSKU一覧（商品リスト・リサーチ） */
.stock-badge.stock-skus { cursor: pointer; }
.stock-badge.stock-skus:hover { filter: brightness(0.95); text-decoration: underline; }
.rq-stock-btn { border: none; background: #eef7ff; color: #1971c2; border-radius: 10px; padding: 2px 10px; font: inherit; font-weight: 800; cursor: pointer; }
.rq-stock-btn:hover { background: #d0ebff; }
.rq-stock-btn.rq-stock-low { background: #fff0f0; color: #c92a2a; }
.sku-cnt { font-size: 13px; font-weight: 700; color: #0b7a43; margin-bottom: 8px; }
.sku-empty { color: #888; font-size: 13px; padding: 10px 2px; }
/* 表がモーダル幅を超えたら、表の中だけ横スクロール（セルが重ならないように） */
.sku-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 4px; }
.sku-tbl { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 13px; table-layout: auto; }
.sku-tbl th, .sku-tbl td { border: 1px solid #eee; padding: 6px 8px; text-align: left; white-space: nowrap; }
.sku-tbl th { background: #f7f7f9; font-size: 12px; color: #555; }
.sku-c-money { text-align: right; }
.sku-c-stage { background: #eef7ff; color: #1971c2; border-radius: 10px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.sku-c-copy { margin-left: 6px; border: 1px solid #ddd; background: #fff; border-radius: 6px; cursor: pointer; font-size: 11px; padding: 0 5px; }

/* ヘッダーの列フィルタ：スプレッドシート風の▼ボタンとメニュー */
th .col-fbtn { margin-left: 4px; padding: 0 4px; border: 1px solid transparent; background: transparent; color: #9aa5b1;
  border-radius: 4px; font-size: 10px; line-height: 1.4; cursor: pointer; vertical-align: middle; }
th:hover .col-fbtn { color: #5b6b7c; background: #e4ebf3; }
th .col-fbtn.on { color: #fff; background: #e8a33d; border-color: #d7912b; }
.col-menu { position: fixed; z-index: 60; width: 260px; background: #fff; border: 1px solid #cfd8e3; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(20,30,50,.18); font-size: 12px; color: #333; overflow: hidden; }
.col-menu .cm-head { padding: 8px; border-bottom: 1px solid #eef2f6; }
.col-menu .cm-text { width: 100%; padding: 5px 8px; border: 1px solid #cfd8e3; border-radius: 6px; font-size: 12px; box-sizing: border-box; }
.col-menu .cm-tools { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid #eef2f6; }
.col-menu .cm-tools button { border: 1px solid #d7e0ea; background: #f7fafd; color: #40556b; border-radius: 5px; padding: 2px 7px; font-size: 11px; cursor: pointer; white-space: nowrap; }
.col-menu .cm-tools button:hover { background: #e8f0fa; }
.col-menu .cm-find { flex: 1; min-width: 0; padding: 3px 7px; border: 1px solid #cfd8e3; border-radius: 5px; font-size: 11px; }
.col-menu .cm-list { max-height: 240px; overflow-y: auto; padding: 4px 0; }
.col-menu .cm-row { display: flex; align-items: center; gap: 7px; padding: 3px 10px; cursor: pointer; }
.col-menu .cm-row:hover { background: #f4f8fd; }
.col-menu .cm-row input { width: 14px; height: 14px; flex: none; cursor: pointer; }
.col-menu .cm-lb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-menu .cm-n { color: #9aa5b1; font-size: 11px; flex: none; }
.col-menu .cm-loading, .col-menu .cm-more { color: #9aa5b1; font-size: 11px; padding: 8px 10px; }
.col-menu .cm-foot { display: flex; justify-content: space-between; gap: 6px; padding: 8px; border-top: 1px solid #eef2f6; background: #fafcfe; }
.col-menu .cm-foot button { border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.col-menu .cm-clear { border: 1px solid #e4e8ee; background: #fff; color: #77828e; }
.col-menu .cm-apply { border: none; background: #c2255c; color: #fff; font-weight: 700; }
.colf-clear { border-color: #e8a33d; color: #b5710e; background: #fffaf0; font-weight: 700; }

/* 在庫＋販売履歴ポップアップ（リサーチ・商品リストの在庫数クリック） */
.sku-sec-h { font-size: 13px; font-weight: 800; color: #343a40; margin: 2px 0 8px; padding-left: 8px; border-left: 4px solid #63b98a; }
.sku-sec-h2 { margin-top: 20px; border-left-color: #e8a33d; }
.sku-sec-note { font-size: 11px; font-weight: 400; color: #999; margin-left: 8px; }
.sku-sum { font-size: 12px; color: #555; background: #fffaf0; border: 1px solid #f0d9b5; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; }
.sku-plus { color: #0b7a43; }
.sku-minus { color: #e03131; }
.sku-ret-n { color: #c92a2a; }
.sku-row-ret td { background: #fff5f5; color: #a03; }
.sku-ret { margin-left: 6px; font-size: 10px; background: #ffe3e3; color: #c92a2a; border-radius: 8px; padding: 1px 6px; }
.stock-zero { color: #bbb; cursor: pointer; }
.stock-zero:hover { color: #1971c2; text-decoration: underline; }
/* 保留の理由 */
.hold-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hold-chip { border: 1px solid #d0bdec; background: #f8f4ff; color: #6741a8; border-radius: 14px; padding: 4px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.hold-chip:hover { background: #6741a8; color: #fff; border-color: #6741a8; }
.hold-note { font-size: 11px; color: #999; margin-top: 8px; }
/* 「❓要確認」を自分の保留に引き取る時に、リサーチ担当が書いたメモを参考として出す */
.hold-from { background: #fff9db; border: 1px solid #ffe066; border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; font-size: 13px; line-height: 1.7; color: #495057; }
.hold-from-sub { font-size: 11.5px; color: #806c1f; margin-top: 4px; }
/* 在庫ポップアップ：入荷・作業中（まだ出荷していない分）は控えめに */
.sku-row-work td { background: #fcfcfd; color: #667; }
.sku-c-stage.sku-c-work { background: #f1f3f5; color: #6c757d; }
.model-stock-warn { margin-left: 8px; background: #fff0f0; color: #c92a2a; border: 1px solid #ffc9c9; border-radius: 8px; padding: 1px 8px; font-size: 12px; font-weight: 700; }

/* この商品だけの説明文エディタ（納品の編集ポップアップ） */
.desc-edit-fld textarea { width: 100%; box-sizing: border-box; font-size: 13px; line-height: 1.6; padding: 8px 10px; border: 1px solid #cfd8e3; border-radius: 8px; font-family: inherit; }
.desc-edit-fld textarea:focus { outline: none; border-color: #63b98a; box-shadow: 0 0 0 2px rgba(99,185,138,.2); }
.desc-edit-badge { margin-left: 8px; font-size: 11px; font-weight: 700; color: #b5710e; background: #fff8ec; border: 1px solid #e8b86d; border-radius: 10px; padding: 1px 8px; }
.desc-edit-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.desc-chip { border: 1px solid #cfe3d5; background: #f4fbf6; color: #0b7a43; border-radius: 14px; padding: 3px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.desc-chip:hover { background: #0b7a43; color: #fff; border-color: #0b7a43; }
.desc-edit-note { font-size: 11px; color: #888; margin-top: 7px; line-height: 1.6; }
.desc-reset { margin-left: 6px; border: 1px solid #ddd; background: #fff; color: #666; border-radius: 6px; padding: 2px 8px; font-size: 11px; cursor: pointer; }
.desc-reset:hover { background: #f1f3f5; }
.desc-edited { font-size: 11px; }
/* テンプレを変えたけど、この商品は編集済みなので自動では入れ替えない時のお知らせ */
.desc-tpl-notice { margin-top: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.7; color: #8a5a00; background: #fff8ec; border: 1px solid #e8b86d; border-radius: 8px; }
.desc-tpl-notice b { color: #b5710e; }
.desc-usetpl { display: inline-block; margin: 6px 6px 0 0; border: 1px solid #0b7a43; background: #0b7a43; color: #fff; border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.desc-usetpl:hover { background: #0a6a3a; }
.desc-keep { display: inline-block; margin-top: 6px; border: 1px solid #ddd; background: #fff; color: #666; border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.desc-keep:hover { background: #f1f3f5; }

/* 型番別 落札率（リサーチ）。候補は出るのに勝てていない型番を探す表 */
.mw-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.mw-find { flex: 1; min-width: 180px; padding: 6px 10px; border: 1px solid #ced4da; border-radius: 6px; font-size: 13px; }
.mw-only { font-size: 12px; color: #666; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.mw-scroll { overflow-x: auto; max-height: 52vh; overflow-y: auto; }
.mw-tbl { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mw-tbl th { position: sticky; top: 0; background: #f8f9fa; border-bottom: 2px solid #dee2e6; padding: 5px 8px; font-size: 11px; color: #555; white-space: nowrap; text-align: right; }
.mw-tbl th:first-child { text-align: left; }
.mw-tbl td { border-bottom: 1px solid #f1f3f5; padding: 5px 8px; text-align: right; white-space: nowrap; }
.mw-name { text-align: left !important; font-weight: 700; color: #1f2a44; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.mw-dim { color: #adb5bd; }
.mw-good { color: #0b7a43; font-weight: 800; }
.mw-mid { color: #b5710e; font-weight: 800; }
.mw-bad { color: #c92a2a; font-weight: 800; }
.mw-note { margin-top: 10px; padding: 9px 12px; background: #fff8ec; border: 1px solid #e8b86d; border-radius: 8px; font-size: 11.5px; color: #8a5a00; line-height: 1.8; }

/* 一覧ヘッダの「表示中を全選択」チェック（納品・返品） */
#grid th .ship-check-all, #grid th .ret-check-all { margin: 2px auto 0; display: block; cursor: pointer; }

/* 表を出すモーダルは広く（型番別 落札率など） */
.modal.modal-wide { width: 1180px; }
.mw-csv { border: 1px solid #63e6be; background: #fff; color: #0b7a43; border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mw-csv:hover { background: #e6fcf5; }
.mw-pick { border: 1px solid #ffd8a8; background: #fff4e6; color: #b5710e; border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mw-pick:hover { background: #ffe8cc; }
.mw-ng { border: 1px solid #ffc9c9; background: #fff5f5; color: #c92a2a; border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mw-ng:hover:not(:disabled) { background: #ffe3e3; }
.mw-ng:disabled { opacity: .45; cursor: default; }
.mw-chk { cursor: pointer; }
.mw-isng { background: #fafafa; color: #999; }
.mw-onlytag { color: #666 !important; background: #f1f3f5 !important; border-color: #dee2e6 !important; }
.mw-ngtag { margin-left: 6px; font-size: 10px; font-weight: 700; color: #c92a2a; background: #fff5f5; border: 1px solid #ffc9c9; border-radius: 8px; padding: 0 6px; }
.mw-sweep { font-size: 12px; color: #666; display: flex; align-items: center; gap: 4px; white-space: nowrap; cursor: pointer; }
.mw-ym { padding: 6px 10px; border: 1px solid #ced4da; border-radius: 6px; font-size: 13px; font-weight: 700; color: #1f2a44; cursor: pointer; }

/* 在庫：縦積み（同じ商品を何点持っているか） */
.stk-badge { border: 1px solid #dee2e6; background: #fff; border-radius: 10px; padding: 2px 9px; font-size: 12px; font-weight: 800; cursor: pointer; }
.stk-ok { color: #868e96; }
.stk-none { color: #ced4da; }   /* 在庫0＝縦積みなし。押せば過去の販売実績は見られる */
.stk-warn { color: #b5710e; background: #fff8ec; border-color: #ffd8a8; }
.stk-bad { color: #c92a2a; background: #fff5f5; border-color: #ffc9c9; }
.stk-badge:hover { filter: brightness(.95); }
.stat-stacked { cursor: pointer; border-color: #ffd8a8; background: #fff8ec; }
.stat-stacked .n { color: #b5710e; }
.stat-stacked.on { border-color: #e8590c; box-shadow: 0 0 0 2px rgba(232,89,12,.2); }
.stk-sub { font-size: 12px; font-weight: 600; color: #b5710e; margin-left: 3px; }

/* ASIN一括取込 */
.ba-note { font-size: 12.5px; color: #555; line-height: 1.8; margin-bottom: 8px; }
.ba-in { width: 100%; box-sizing: border-box; font-family: monospace; font-size: 13px; padding: 8px 10px; border: 1px solid #cfd8e3; border-radius: 8px; }
.ba-bar { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.ba-count { font-size: 13px; font-weight: 800; color: #1f2a44; }
.ba-run { border: 1px solid #0b7a43; background: #0b7a43; color: #fff; border-radius: 6px; padding: 6px 16px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ba-run:disabled { opacity: .45; cursor: default; }
.ba-prog { font-size: 12px; color: #666; }
.ba-out { margin-top: 10px; max-height: 30vh; overflow-y: auto; font-size: 12px; line-height: 1.7; }
.ba-row { padding: 3px 8px; border-bottom: 1px solid #f1f3f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ba-ok { color: #0b7a43; }
.ba-skip { color: #adb5bd; }
.ba-fail { color: #c92a2a; }
.ba-seller { border: 1px solid #d0ebff; background: #f8fbff; border-radius: 8px; padding: 9px 12px; margin-bottom: 10px; }
.ba-seller label { display: block; font-size: 12px; font-weight: 700; color: #1971c2; margin-bottom: 5px; }
.ba-sin { width: 260px; max-width: 100%; padding: 5px 8px; border: 1px solid #cfd8e3; border-radius: 6px; font-size: 13px; font-family: monospace; }
.ba-sbtn { margin-left: 6px; border: 1px solid #1971c2; background: #fff; color: #1971c2; border-radius: 6px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.ba-sbtn:disabled { opacity: .5; cursor: default; }
.ba-smsg { margin-left: 8px; font-size: 12px; color: #666; }
.ba-smsg.ok { color: #0b7a43; font-weight: 700; }
.ba-smsg.ng { color: #c92a2a; font-weight: 700; }
.ba-shint { font-size: 11px; color: #777; line-height: 1.7; margin-top: 5px; }
.ba-cond { border: 1px solid #ffe3bf; background: #fffaf3; border-radius: 8px; padding: 9px 12px; margin-bottom: 10px; }
.ba-cond label { display: block; font-size: 12px; font-weight: 700; color: #b5710e; margin-bottom: 6px; }
.ba-c1 { font-size: 12px; color: #555; margin-right: 14px; white-space: nowrap; }
.ba-c1 input { width: 84px; padding: 4px 6px; border: 1px solid #cfd8e3; border-radius: 6px; font-size: 12px; }
.ba-low { color: #b5710e; }
.ba-n { float: right; color: #868e96; font-size: 11px; }
.ba-dist { margin-top: 7px; padding-top: 7px; border-top: 1px dashed #ffe3bf; font-size: 11.5px; color: #666; line-height: 1.9; }
.ba-d1 { margin-right: 12px; white-space: nowrap; }
.ba-d1 i { color: #999; font-style: normal; margin-left: 2px; }
.ba-dim { color: #adb5bd; }
.ba-blk { color: #862e9c; }
.ba-find { color: #0b7285; }
.ba-head { background: #e7f5ff; font-weight: 800; color: #1864ab; }
.ba-mk { color: #495057; font-weight: 700; }
/* 商品リスト：出品可否 */
.lst-ng { display: inline-block; margin-right: 5px; font-size: 10px; font-weight: 800; color: #fff; background: #c92a2a; border-radius: 8px; padding: 1px 6px; }
.lst-warn { display: inline-block; margin-right: 5px; font-size: 10px; font-weight: 800; color: #8a5a00; background: #fff3bf; border: 1px solid #ffd43b; border-radius: 8px; padding: 0 6px; }
.ba-wn { color: #b5710e; font-weight: 700; }
.ba-pickbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid #e9ecef; }
.ba-phint { font-size: 12px; color: #666; font-weight: 700; }
.ba-cb { margin-right: 7px; vertical-align: -2px; cursor: pointer; }
.ba-cbx { display: inline-block; width: 13px; margin-right: 7px; }
.ba-row.ba-done { opacity: .5; text-decoration: line-through; }
.ba-row:has(.ba-cb) { cursor: pointer; }
.ba-row:has(.ba-cb:checked) { background: #f2fbf6; }
.ba-see { margin-left: 10px; border: 1px solid #0b7a43; background: #fff; color: #0b7a43; border-radius: 6px; padding: 4px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.ba-see:hover { background: #e6fcf5; }

/* 売上集計「Amazonその他費用」カードと内訳ポップアップ */
.stat.amz-card { cursor: pointer; border-color: #ffc9c9; background: #fff5f5; }
.stat.amz-card:hover { background: #ffe3e3; }
.stat.amz-card .n { color: #c92a2a; }
.stat.amz-card.amz-off .n { color: #adb5bd; }
.amz-more { display: inline-block; margin-left: 4px; padding: 0 6px; border: 1px solid #ffc9c9; border-radius: 9px; font-size: 10px; color: #c92a2a; background: #fff; }
.amz-box { font-size: 13px; }
.amz-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.amz-table th, .amz-table td { padding: 7px 10px; border-bottom: 1px solid #e9ecef; text-align: left; }
.amz-table thead th { background: #f8f9fa; font-size: 11.5px; color: #666; font-weight: 700; }
.amz-table tfoot td { font-weight: 700; border-top: 2px solid #dee2e6; border-bottom: none; }
.amz-table .amz-n { text-align: right; width: 68px; white-space: nowrap; }
.amz-table .amz-y { width: 110px; }
.amz-table .amz-y, .amz-calc .amz-y { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amz-calc { width: 100%; border-collapse: collapse; background: #f8f9fa; border-radius: 8px; margin-bottom: 14px; }
.amz-calc td { padding: 7px 12px; }
.amz-calc .amz-minus { color: #c92a2a; }
.amz-calc .amz-total td { font-weight: 800; border-top: 2px solid #dee2e6; font-size: 15px; }
.amz-note { font-size: 11.5px; color: #777; line-height: 1.85; }
.amz-note.amz-warn { color: #806c1f; background: #fff9db; border: 1px solid #ffe066; border-radius: 8px; padding: 9px 12px; margin-bottom: 14px; }
.imp-cost { margin-top: 10px; padding: 9px 12px; background: #fff5f5; border: 1px solid #ffc9c9; border-radius: 8px; font-size: 12.5px; color: #495057; line-height: 1.8; }
.imp-cost-k { color: #868e96; font-size: 11.5px; }

/* 月次売上レポート：全体／大石・鳴島の分だけ の切り替えと、範囲の説明バー */
.mr-scope { display: inline-flex; gap: 0; border: 1px solid #ced4da; border-radius: 7px; overflow: hidden; margin: 0 10px; }
.mr-sc { border: 0; background: #fff; color: #666; font-size: 12px; font-weight: 700; padding: 5px 12px; cursor: pointer; }
.mr-sc + .mr-sc { border-left: 1px solid #ced4da; }
.mr-sc:hover { background: #f1f3f5; }
.mr-sc.mr-sc-on { background: #c2255c; color: #fff; }
.mr-scope-note { font-size: 12.5px; line-height: 1.8; padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; background: #f4eefb; border: 1px solid #d0bdec; color: #495057; }
.mr-scope-note.mr-scope-all { background: #f8f9fa; border-color: #dee2e6; }
.mr-skip { font-size: 11.5px; color: #806c1f; }

/* 商品ごとのAmazon手数料カード（すでに入金額に反映済み＝引き算はしない） */
.stat.fee-card { cursor: pointer; border-color: #dee2e6; background: #f8f9fa; }
.stat.fee-card:hover { background: #f1f3f5; }
.stat.fee-card .n { color: #868e96; }
.fee-in { display: block; font-size: 10px; color: #adb5bd; margin-top: 2px; }
.amz-sec { font-size: 11.5px; font-weight: 700; color: #666; margin: 0 0 6px; }
.amz-sub { display: block; font-size: 10.5px; color: #adb5bd; font-weight: 400; }
/* リサーチ：仕入基準の下に「何の値段から出したか」を小さく出す */
.rq-bsbase { font-size: 9.5px; color: #868e96; line-height: 1.25; margin-top: 2px; white-space: nowrap; cursor: help; }
/* 返品の処理：「廃棄」を選んだ時に、仕入れ代も損になることを出す */
.ra-dispose { margin-top: 8px; padding: 9px 12px; background: #fff5f5; border: 1px solid #ffc9c9; border-radius: 8px; font-size: 12.5px; line-height: 1.8; color: #495057; }
.ra-dispose[hidden] { display: none; }
/* 売上集計：処分（Amazon以外）は本筋の数字と分けて出す */
.stat.disp-card { cursor: pointer; border-color: #ffe066; background: #fff9db; }
.stat.disp-card:hover { background: #fff3bf; }
.stat.disp-card .n { color: #a37f00; }
.disp-more { display: inline-block; margin-left: 4px; padding: 0 6px; border: 1px solid #ffe066; border-radius: 9px; font-size: 10px; color: #a37f00; background: #fff; }
.amz-table .dz-y { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amz-table .dz-minus { color: #c92a2a; font-weight: 700; }
.amz-table .dz-name { max-width: 200px; }
/* 処分の中身のSKU・ASIN。長いSKUで表が横に伸びないよう幅を決めて折り返す。
   2026-09-02 くみ「SKUとASINも欲しいですね！」 */
.amz-table .dz-sku { max-width: 210px; font-size: 11.5px; word-break: break-all; }
.amz-table .dz-asin { width: 106px; font-size: 11.5px; white-space: nowrap; }
.bb-hint { display: block; font-size: 11px; color: #a37f00; font-weight: 400; margin-top: 3px; line-height: 1.6; }

/* No列：番号の出どころを見分ける
   紙(指示書)から来た番号と、ツールが計算で振った番号が同じ列に並ぶ。
   996 のとなりに 1812 が来ると何が起きたのか分からないので、
   紙由来には📄を付け、計算のほうは薄くして「仮の番号」と分かるようにする。 */
.no-slip { font-weight: 700; color: #1c7ed6; white-space: nowrap; }
.no-slip-mark { font-size: 9px; margin-left: 1px; vertical-align: super; opacity: .75; }
.no-calc { color: #adb5bd; }

/* 数字の入力欄の上下ボタン（▲▼）を消す。
   金額の欄でうっかり押して仕入値が変わるのを防ぐため。
   Firefoxでは appearance:textfield にすると、ホイールで値が上下するのも止まる。 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* 中古NGの理由（商品リスト）。長い文は…で切って、マウスを乗せると全文が出る */
.ng-note{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#495057}
/* 中古NGなのに理由が入っていない印。書いてほしいので薄く出す */
.ng-note-empty{color:#adb5bd}
/* 列を選ぶ画面で「ふだん非表示」の注記 */
.col-off-memo{color:#868e96;font-size:11px}

/* 指示書を印刷済み＝現物にラベルが貼ってある印。SKUが自動で変わらない */
.sku-lock{margin-right:3px;font-size:11px;opacity:.75}
/* SKUが長すぎる（プライスターの40バイト上限オーバー）。登録しに行く前に気づけるように */
.sku-long{margin-right:4px;font-size:10px;font-weight:800;color:#fff;background:#e03131;
  border-radius:4px;padding:1px 5px;white-space:nowrap;cursor:help}

/* 外観状態が「マスタの既定で入っている」ことを示す印（保存済みの値と見分けるため） */
.appr-def {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 8px;
  background: #f4eefb; color: #6741a8; border: 1px solid #d0bdec;
  font-size: 10px; font-weight: 700;
}

/* 中古NGの理由が「出品できなくなった」＝手元の在庫がAmazonに出せない。
   メーカー単位の「🚫 出品不可」(.lst-ng) とは別物なので色を分ける。 */
.cant-list {
  display: inline-block; margin-right: 5px; padding: 1px 6px; border-radius: 6px;
  background: #fff0f6; color: #a61e4d; border: 1px solid #faa2c1;
  font-size: 10px; font-weight: 800; white-space: nowrap; cursor: help;
}
/* リサーチ：同じ理由で中古NGになっている候補は濃く出す */
.rq-mng.rq-mng-hard { background: #fff0f6; color: #a61e4d; border-color: #faa2c1; }
/* 一覧でも行ごと分かるように、うすいピンクの背景＋左に細い線。
   検品の異常あり（赤）より弱い色にして、赤の方が先に目に入るようにしている。 */
tbody tr.row-cantlist td { background: #fff0f6 !important; }
tbody tr.row-cantlist:hover td { background: #ffdeeb !important; }
tbody tr.row-cantlist td:first-child { box-shadow: inset 4px 0 0 #f06595; }
.card.row-cantlist { background: #fff0f6; box-shadow: inset 4px 0 0 #f06595; }

/* 商品マスタで「自己発送」にしている商品の印（FBAに送らない） */
.self-ship {
  display: inline-block; margin-right: 5px; padding: 1px 6px; border-radius: 6px;
  background: #fff0f6; color: #a61e4d; border: 1px solid #faa2c1;
  font-size: 10px; font-weight: 800; white-space: nowrap; cursor: help;
}

/* 🛠 ツールの更新のお知らせ（久美さんのダッシュボードのカード） */
.upd-row { border-top: 1px solid #f1f3f5; padding: 7px 2px; }
.upd-row:first-of-type { border-top: none; }
.upd-head { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #1f2a44; }
.upd-date { font-size: 11px; color: #868e96; font-weight: 700; min-width: 3.4em; }
.upd-badge {
  background: #c2255c; color: #fff; border-radius: 6px;
  font-size: 9.5px; font-weight: 800; padding: 1px 5px;
}
.upd-body { font-size: 12px; color: #495057; line-height: 1.6; margin: 2px 0 0 3.4em; }
.upd-new .upd-head b { color: #c2255c; }

/* ===== 📈 分析（久美さんだけ） =====
   2026-09-21 くみ「まずはプライスターみたいなのが理想かな」
   プライスターの売上分析と同じ読み方（期間を選ぶ→数字の帯→推移→表）。
   グラフは外部のライブラリを使わず、その場で書いたSVG。 */
.ana-h-note { font-size: 13px; color: #868e96; font-weight: 400; }
.ana-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.ana-lb { font-size: 12px; color: #868e96; font-weight: 700; }
.ana-bar select, .ana-bar input[type="date"] {
  padding: 5px 10px; border: 1px solid #f3b9d2; border-radius: 8px;
  font-size: 13px; font-weight: 700; color: #c2255c; background: #fff;
}
/* タブ。形はプライスターと同じ「フォルダ」、色はこのツールのピンク
   （2026-09-21 くみ「プライスターの画面みたいにタブで切り替えられるとよき」
     「あとプライスターの色は真似しないでね　なんか茶色いの気になる」） */
.ana-tabs {
  display: flex; gap: 2px; flex-wrap: wrap; margin: 0 0 14px;
  background: #a61e4d; border-radius: 10px 10px 0 0; padding: 6px 6px 0;
}
.ana-tab {
  padding: 7px 20px 8px; border: none; border-radius: 8px 8px 0 0;
  background: transparent; font-size: 13px; color: #fff; cursor: pointer;
}
.ana-tab:hover { background: rgba(255, 255, 255, .18); }
.ana-tab.on { background: #fff; color: #a61e4d; font-weight: 800; }
/* 並べ替えの小さなボタン（タブではないので丸いまま） */
.ana-pills { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 12px; }
.ana-pill {
  padding: 4px 14px; border: 1px solid #dee2e6; border-radius: 999px;
  background: #fff; font-size: 12px; color: #495057; cursor: pointer;
}
.ana-pill.on { background: #c2255c; border-color: #c2255c; color: #fff; font-weight: 700; }
.ana-legend { margin-left: auto; font-size: 12px; color: #868e96; display: flex; align-items: center; gap: 4px; }
.ana-legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.ana-sum { font-size: 13px; color: #495057; }
.ana-sum b { color: #c2255c; }
/* グラフは画面が広くても作った大きさより大きくしない（max-height は各SVGが持つ）。
   2026-09-21 くみ「このグラフ周りがでかすぎて嫌だって」 */
.ana-svg { width: 100%; height: auto; display: block; margin: 0 auto 10px; }
.ana-up { color: #0b7a43; }
.ana-down { color: #c92a2a; }
.ana-flat { color: #868e96; }
.ana-empty { color: #868e96; font-size: 13px; padding: 24px; text-align: center; }
.ana-h4 { font-size: 13px; color: #1f2a44; margin: 18px 0 8px; }
.ana-note { font-size: 12px; color: #868e96; line-height: 1.7; margin: 12px 0 0; }
.ana-note b { color: #495057; }
/* 分析のカードは中身の高さなり（ダッシュボードの420px固定とは別物） */
#cards > .dash-card + .dash-card, #cards > .ana-grid + .dash-card,
#cards > .ana-grid2 + .dash-card { margin-top: 16px; }

/* カードを並べる（2026-09-21 くみ「こんなイメージだとかっこいいよね」） */
.ana-grid {
  display: grid; grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px; align-items: start; margin-top: 16px;
}
.ana-grid2 {
  /* 日別売上表に目標の列を足したので、商品別を狭めて日別を広くする（くみ 2026-10-16） */
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 16px; align-items: stretch; margin-top: 16px;
}
/* 日別売上表と商品別売上の高さをそろえる（くみ 2026-10-01「高さを商品別に揃えて」）。
   商品別には並べ替えのボタンと要約が1行ずつ載るぶん背が高いので、
   align-items:stretch で2枚の高さを合わせ、中の表（.ana-scroll）を伸ばして埋める。
   どちらかの表が長くなりすぎないように、カードの高さに上限を置いて中でスクロールさせる。 */
.ana-grid2 > .dash-card { display: flex; flex-direction: column; max-height: 560px; }
.ana-grid2 > .dash-card > .ana-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
.ana-chartbox { min-height: 200px; }

/* 期間の数字（スマレジの「純売上」の列のように縦に並べる） */
.ana-hero {
  font-size: 30px; font-weight: 800; color: #1f2a44; line-height: 1.2;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.ana-hero-s { font-size: 12px; color: #868e96; margin: 2px 0 12px; }
.ana-hero-s b { color: #495057; font-size: 14px; }
.ana-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; padding: 7px 2px; border-bottom: 1px solid #f1f3f5;
}
.ana-row-l { font-size: 12px; color: #868e96; font-weight: 700; }
.ana-row-v {
  font-size: 15px; color: #1f2a44; font-variant-numeric: tabular-nums;
  white-space: nowrap; text-align: right;
}
.ana-row-on { background: #fff5f9; border-radius: 6px; padding: 7px 8px; }
.ana-row-on .ana-row-v b { color: #c2255c; font-size: 17px; }
.ana-row-gap { margin-top: 10px; border-top: 1px solid #dde3ec; }
.ana-u { font-size: 11px; font-weight: 400; color: #868e96; margin-left: 2px; }

/* 表（日別売上表・商品別売上・曜日別） */
.ana-scroll { max-height: 440px; overflow-y: auto; }
.ana-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.ana-tbl th {
  font-size: 11px; color: #868e96; font-weight: 700; text-align: right;
  padding: 6px 8px; border-bottom: 2px solid #dde3ec; white-space: nowrap;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.ana-tbl th:first-child, .ana-tbl td:first-child { text-align: left; }
.ana-tbl td:first-child { white-space: nowrap; }
.ana-tbl td { padding: 6px 8px; border-bottom: 1px solid #f1f3f5; }
.ana-tbl td.ana-n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 入金額＝Amazonから振り込まれる額。売上のとなりで目で追えるよう少し濃くする */
.ana-tbl td.ana-paid { color: #1864ab; font-weight: 700; }
.ana-paid { color: #1864ab; }
.ana-tbl tr.ana-total td { font-weight: 800; border-top: 2px solid #dde3ec; border-bottom: none; }
.ana-wd { margin-left: 6px; font-size: 11px; color: #868e96; }
.ana-wd-sun { color: #e8590c; font-weight: 700; }
.ana-wd-sat { color: #1c7ed6; font-weight: 700; }

/* 商品別売上 */
.ana-prod td { vertical-align: top; }
.ana-prod td, .ana-prod th { padding: 5px 6px; font-size: 12px; }
.ana-prod th:nth-child(2) { text-align: left; }
.ana-p-no { color: #adb5bd; font-size: 11px; width: 24px; }
.ana-p-n { min-width: 170px; max-width: 300px; }
.ana-p-name {
  font-size: 12px; color: #1f2a44; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ana-p-sub { font-size: 11px; color: #868e96; margin-top: 1px; }
.ana-p-bar { background: #f5f6f8; border-radius: 3px; height: 5px; margin-bottom: 3px; }
.ana-p-bar i { display: block; height: 5px; border-radius: 3px; background: #c2255c; }

/* 経費：月を選ぶ小さな棒＋その月の科目内訳 */
.ana-imp {
  padding: 6px 14px; border: 1px solid #c2255c; border-radius: 8px;
  background: #fff; color: #c2255c; font-size: 13px; font-weight: 700; cursor: pointer;
}
.ana-imp:disabled { opacity: .5; cursor: default; }
.ana-mbars { display: flex; align-items: flex-end; gap: 4px; margin: 0 0 12px; }
.ana-mbar {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; padding: 2px 0 0; cursor: pointer;
}
.ana-mbar i { display: block; width: 100%; max-width: 46px; background: #f0d3de; border-radius: 3px; }
.ana-mbar span { font-size: 10px; color: #adb5bd; }
.ana-mbar.on i { background: #c2255c; }
.ana-mbar.on span { color: #c2255c; font-weight: 800; }
.ana-mbar:hover i { background: #dda3bd; }
.ana-hbars { display: flex; flex-direction: column; gap: 6px; }
.ana-hrow { display: grid; grid-template-columns: 200px 1fr 110px; align-items: center; gap: 10px; }
.ana-hlab { font-size: 12px; color: #1f2a44; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ana-htrack { background: #f5f6f8; border-radius: 4px; height: 14px; }
.ana-htrack i { display: block; height: 14px; border-radius: 4px; }
.ana-hval { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: #495057; }
.ana-dbl {
  margin-left: 6px; font-size: 10px; font-weight: 700; color: #a61e4d;
  background: #ffdeeb; border-radius: 8px; padding: 1px 6px; white-space: nowrap; cursor: help;
}
/* 会計ベースの計算（売上高 − 仕入高 − 経費 ＝ 利益） */
.ana-sts { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.ana-st { border: 1px solid #eef1f5; border-radius: 10px; padding: 8px 14px; min-width: 130px; }
.ana-st-l { font-size: 11px; color: #868e96; font-weight: 700; }
.ana-st-v { font-size: 17px; font-weight: 800; color: #1f2a44; font-variant-numeric: tabular-nums; }
.ana-st-on { border-color: #f3b9d2; background: #fff5f9; }
.ana-st-on .ana-st-v { color: #c2255c; }
.ana-op { align-self: center; color: #adb5bd; font-weight: 800; }

/* カレンダー（スマレジのカレンダーのように、日ごとの売上をマス目で） */
.ana-cal {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px; margin-bottom: 6px;
}
.ana-cal-h {
  font-size: 11px; font-weight: 700; color: #868e96; text-align: center;
  padding: 2px 0 4px;
}
.ana-cal-c {
  border: 1px solid #eef1f5; border-radius: 6px; padding: 5px 6px 6px;
  min-height: 58px; display: flex; flex-direction: column; gap: 1px;
}
.ana-cal-x { background: #fbfbfc; }
.ana-cal-d { font-size: 11px; color: #868e96; font-weight: 700; }
.ana-cal-v {
  font-size: 12px; color: #1f2a44; font-weight: 700; margin-top: auto;
  font-variant-numeric: tabular-nums;
}
.ana-cal-n { font-size: 10px; color: #868e96; }
.ana-cal-h.ana-wd-sun, .ana-cal-d.ana-wd-sun { color: #e8590c; }
.ana-cal-h.ana-wd-sat, .ana-cal-d.ana-wd-sat { color: #1c7ed6; }
/* 構成比（その商品の割合／右の小さい数字はここまでの累計） */
.ana-p-cum { color: #495057; }

@media (max-width: 1100px) {
  .ana-grid, .ana-grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .ana-hrow { grid-template-columns: 130px 1fr 90px; }
  .ana-p-n { max-width: 220px; }
  .ana-hero { font-size: 24px; }
  .ana-cal-c { min-height: 46px; padding: 3px 4px 4px; }
  .ana-cal-v { font-size: 10px; }
  .ana-cal-n { display: none; }
}

/* ===== 💰 キャッシュフロー管理（久美さんだけ） =====
   2026-09-21 くみ「とりあえずいつまでにいくら用意するっていうのと、
   収支を赤字にならない生き方にしたい」
   見た目は分析画面（.ana-*）と同じ部品を使い回す。 */
.cp-note {
  background: #fff5f9; border: 1px solid #f3b9d2; border-radius: 10px;
  padding: 10px 14px; font-size: 13px; color: #495057; line-height: 1.7;
  margin-bottom: 16px;
}
.cp-note b { color: #c2255c; }
.cp-hero {
  border: 1px solid #eef1f5; border-left: 5px solid #0ca678; border-radius: 12px;
  padding: 12px 16px; margin-bottom: 12px;
}
.cp-hero.cp-yellow { border-left-color: #e8590c; }
.cp-hero.cp-red { border-left-color: #e03131; background: #fff5f5; }
.cp-badge {
  display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 10px;
  border-radius: 999px; background: #f1f3f5; margin-bottom: 6px;
}
.cp-hero-t { font-size: 20px; font-weight: 800; line-height: 1.4; }
.cp-hero-t b { font-size: 26px; }
.cp-hero-s { font-size: 12px; color: #868e96; margin-top: 4px; line-height: 1.7; }
.cp-form {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin: 10px 0 4px;
}
.cp-form input, .cp-form select {
  padding: 6px 10px; border: 1px solid #dee2e6; border-radius: 8px;
  font-size: 13px; color: #1f2a44; background: #fff; min-width: 0;
}
.cp-form input[type="text"] { flex: 1 1 150px; }
.cp-form input[type="number"] { width: 130px; text-align: right; }
.cp-add {
  padding: 6px 16px; border: 1px solid #c2255c; border-radius: 8px;
  background: #c2255c; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
}
.cp-mini {
  padding: 2px 10px; border: 1px solid #f3b9d2; border-radius: 999px;
  background: #fff; color: #c2255c; font-size: 11px; font-weight: 700;
  cursor: pointer; margin: 2px;
}
.cp-del {
  padding: 2px 10px; border: 1px solid #dee2e6; border-radius: 999px;
  background: #fff; color: #868e96; font-size: 11px; cursor: pointer;
}
.cp-del:hover { border-color: #e03131; color: #c92a2a; }
/* カード・固定費を1枚ずつ（2026-09-21 くみ「クレカの情報も入れたいねー」） */
.cp-sec { margin-bottom: 26px; }
.cp-sec-h { display: flex; align-items: center; gap: 12px; }
.cp-sec-h h4 { font-size: 15px; color: #1f2a44; margin: 0; }
.cp-total {
  margin-left: auto; font-size: 14px; font-weight: 800; color: #c2255c;
  background: #fff0f6; border-radius: 999px; padding: 3px 14px;
  font-variant-numeric: tabular-nums;
}
.cp-sec-s { font-size: 12px; color: #868e96; margin: 4px 0 12px; }
.cp-card {
  background: #fcfcfd; border: 1px solid #eef1f5; border-radius: 12px;
  padding: 10px 12px; margin-bottom: 8px;
}
.cp-fs { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.cp-f { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cp-f label { font-size: 11px; color: #868e96; font-weight: 700; }
.cp-f input, .cp-f select {
  padding: 6px 10px; border: 1px solid #dee2e6; border-radius: 8px;
  font-size: 13px; color: #1f2a44; background: #fff; width: 108px;
}
.cp-f input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }
.cp-f:first-child input { width: 150px; }
.cp-f select { width: 120px; }
.cp-f-x { justify-content: flex-end; margin-left: auto; }
.cp-card-n { font-size: 11px; color: #868e96; margin-top: 8px; line-height: 1.7; }
.cp-card-n b { color: #c2255c; }
.cp-set { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.cp-set label { min-width: 150px; }
.cp-set input {
  padding: 6px 10px; border: 1px solid #dee2e6; border-radius: 8px;
  font-size: 14px; color: #1f2a44; width: 170px; text-align: right;
}
.cp-set input[type="date"] { text-align: left; }
.ana-tbl tr.cp-warn td { background: #fff4e6; }
.ana-tbl tr.cp-bad td { background: #fff5f5; }

/* ===== 見送りの内訳（久美さんだけ）=====
   2026-09-28 くみ「この抽出をもとに見送り分を分析して、次回からもう少し弾けないかな？」
   実績ポップアップの下に出す。色はツールのピンク系でそろえる。 */
.sk-wrap { margin-top: 18px; max-width: 860px; }
.sk-h { font-size: 17px; font-weight: 800; color: #a61e4d; margin: 0 0 8px; }
.sk-lead { font-size: 14px; line-height: 1.8; color: #495057; background: #fff5f8;
  border: 1px solid #f7d6e2; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.sk-em { color: #c2255c; }
.sk-loading { font-size: 14px; color: #868e96; padding: 14px 2px; }
.sk-card { background: #fff; border: 1px solid #ecebef; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 14px; }
.sk-card-h { font-size: 15px; font-weight: 800; color: #343a40; margin-bottom: 10px; }
.sk-card-key { border: 2px solid #f0b4c8; background: #fffafc; }
.sk-big { font-size: 40px; font-weight: 800; color: #c2255c; line-height: 1.1; }
.sk-big span { font-size: 16px; font-weight: 700; margin-left: 4px; }
.sk-big-note { font-size: 13px; line-height: 1.8; color: #495057; margin: 6px 0 10px; }
.sk-switch { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700;
  color: #a61e4d; background: #fff0f5; border: 1px solid #f0b4c8; border-radius: 8px;
  padding: 10px 12px; cursor: pointer; }
.sk-switch input { width: 18px; height: 18px; cursor: pointer; }
.sk-sub { font-size: 12px; line-height: 1.9; color: #868e96; margin-top: 8px; }
.sk-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
@media (max-width: 760px) { .sk-grid { grid-template-columns: 1fr; } }
.sk-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.sk-t th { background: #f8f9fa; color: #868e96; font-size: 11px; font-weight: 700;
  padding: 7px 8px; text-align: left; border-bottom: 1px solid #ecebef; white-space: nowrap; }
.sk-t td { padding: 7px 8px; border-bottom: 1px solid #f4f4f6; }
.sk-t .sk-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.sk-t .sk-p { text-align: right; color: #868e96; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sk-t .sk-b { width: 34%; }
.sk-t .sk-none { color: #adb5bd; text-align: center; }
.sk-bar { display: block; background: #f1f3f5; border-radius: 3px; height: 8px; }
.sk-bar i { display: block; height: 8px; border-radius: 3px; background: #c2255c; }
.sk-tag { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700;
  color: #1c7ed6; background: #e7f2fd; border-radius: 4px; padding: 1px 5px; }
.sk-t-w .sk-wchk { display: flex; align-items: center; gap: 7px; font-weight: 700; cursor: pointer; }
.sk-t-w .sk-wchk input { width: 16px; height: 16px; cursor: pointer; }
.sk-t-w .sk-zero { color: #0ca678; }
.sk-t-w .sk-warn { color: #e03131; }
.sk-t-w .sk-note { font-size: 11px; color: #868e96; }
.sk-t-w tr.sk-risky { background: #fff5f5; }
.sk-addrow { display: flex; gap: 8px; margin-top: 8px; }
.sk-addsub { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e9ecef;
  font-size: 12px; color: #868e96; line-height: 1.6; }
.sk-addrow input { flex: 1; max-width: 320px; padding: 8px 10px; font-size: 13px;
  border: 1px solid #dee2e6; border-radius: 6px; }
.sk-addbtn { padding: 8px 14px; font-size: 13px; font-weight: 700; color: #a61e4d;
  background: #fff0f5; border: 1px solid #f0b4c8; border-radius: 6px; cursor: pointer; }
/* 🚫 いま弾いているもの（先頭のまとめ）と、たたんだ「くわしく見る」。
   2026-10-06 くみ「項目多すぎて分かりづらいから、弾いてるもの
                    とりあえず一覧で見えればいいのだけど」 */
.sk-now { margin-bottom: 18px; }
.sk-now-h { font-size: 19px; font-weight: 800; color: #c92a2a; margin: 4px 0 10px; }
.sk-nrow { display: flex; align-items: baseline; gap: 10px; padding: 7px 2px;
  border-bottom: 1px solid #f1f3f5; font-size: 14px; }
.sk-nrow:last-child { border-bottom: none; }
.sk-nmark { flex: 0 0 auto; }
.sk-ntxt { flex: 1 1 auto; min-width: 0; }
.sk-ntxt i { display: block; font-style: normal; font-size: 11px; color: #868e96; }
.sk-nn { flex: 0 0 auto; font-weight: 700; font-size: 13px; color: #495057; white-space: nowrap; }
.sk-noff { color: #adb5bd; }
.sk-noff .sk-nn { color: #ced4da; font-weight: 400; }
.sk-dimrow td { color: #adb5bd; }
.sk-tag-hide { display: inline-block; font-size: 11px; font-weight: 700; color: #c92a2a;
  background: #fff5f5; border: 1px solid #ffc9c9; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.sk-tag-warn { display: inline-block; font-size: 11px; color: #868e96;
  background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.sk-more { border-top: 2px solid #e9ecef; padding-top: 10px; margin-bottom: 14px; }
.sk-more-h { cursor: pointer; font-size: 16px; font-weight: 800; color: #6741a8;
  padding: 10px 2px; list-style: none; }
.sk-more-h::-webkit-details-marker { display: none; }
.sk-more-h::before { content: "▶ "; font-size: 12px; }
.sk-more[open] > .sk-more-h::before { content: "▼ "; }
/* 言葉を調べた結果。弾いていいかを色で分ける。
   2026-10-05 くみ「「GUCCI」と入れたら今まで何件見送りにしているか出てきて、
                    見送りにするかどうするか判定できるようにしない？」 */
.sk-wres { margin-top: 12px; padding: 14px 16px; border-radius: 10px; font-size: 14px; line-height: 1.7; }
.sk-wgood { background: #ebfbee; border: 1px solid #b2f2bb; }
.sk-wbad { background: #fff5f5; border: 1px solid #ffc9c9; }
.sk-wok { background: #f1f3f5; border: 1px solid #dee2e6; color: #495057; }
.sk-wnone { background: #f8f9fa; border: 1px solid #e9ecef; color: #868e96; }
.sk-wh { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.sk-wgood .sk-wh { color: #2b8a3e; }
.sk-wbad .sk-wh { color: #c92a2a; }
.sk-wnum { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sk-wn { background: #fff; border: 1px solid #e9ecef; border-radius: 8px;
  padding: 8px 16px; text-align: center; min-width: 92px; }
.sk-wn b { display: block; font-size: 24px; line-height: 1.2; }
.sk-wn i { font-style: normal; font-size: 11px; color: #868e96; }
.sk-wn-ok b { color: #2b8a3e; }
.sk-wn-bad b { color: #c92a2a; }
.sk-wn-dim b { color: #adb5bd; }
.sk-wsub { font-size: 13px; color: #495057; }
.sk-wex { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: #495057; }
.sk-wex li { margin-bottom: 3px; }
.sk-wexm { color: #adb5bd; font-size: 11px; margin-left: 6px; }
.sk-wex-bad li { color: #c92a2a; }
.sk-wbtn { margin-top: 12px; padding: 10px 22px; font-size: 14px; font-weight: 800;
  color: #fff; background: #2b8a3e; border: none; border-radius: 8px; cursor: pointer; }
.sk-wbtn-risky { background: #fff; color: #c92a2a; border: 1px solid #ffa8a8; font-weight: 700; }
/* 🚫 弾く設定の月えらび */
.sk-ymhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-weight: 800; color: #495057; font-size: 15px; margin-bottom: 10px; }
.sk-ymhead select { padding: 6px 10px; border: 1px solid #dee2e6; border-radius: 6px; font-size: 14px; }
.sk-ymnote { font-size: 11px; font-weight: 400; color: #868e96; }
.sk-save { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sk-savebtn { padding: 11px 24px; font-size: 15px; font-weight: 800; color: #fff;
  background: #c2255c; border: none; border-radius: 8px; cursor: pointer; }
.sk-savebtn:disabled { background: #dee2e6; cursor: default; }
.sk-savemsg { font-size: 13px; font-weight: 700; color: #0ca678; }
.sk-foot { font-size: 12px; line-height: 1.9; color: #868e96; }
/* 「で、何点減るの？」を数字で出す帯（決められるようにするため） */
.sk-effect { font-size: 13px; line-height: 1.9; color: #343a40; background: #f8f9fa;
  border: 1px solid #ecebef; border-radius: 8px; padding: 9px 12px; margin: 0 0 10px; }
.sk-effect b { color: #c2255c; }
/* 🎯「半分にしたい」に対して、いま何点減らせるか */
.sk-plan { border: 2px solid #c2255c; background: #fff; }
.sk-plan-lead { font-size: 15px; line-height: 1.9; color: #343a40; margin: 8px 0 10px; }
.sk-plan-lead b { color: #c2255c; font-size: 18px; }
.sk-plan-t td { padding: 8px; }
.sk-plan-t .sk-nil { color: #adb5bd; }
.sk-plan-t tr.sk-plan-sum td { border-top: 2px solid #343a40; font-weight: 800; font-size: 15px; }
.sk-plan-t tr.sk-plan-sum .sk-n { color: #c2255c; }
.sk-plan-bar { background: #f1f3f5; border-radius: 4px; height: 12px; margin: 12px 0 8px; overflow: hidden; }
.sk-plan-bar i { display: block; height: 12px; background: #c2255c; border-radius: 4px; }
.sk-plan-note { font-size: 13px; line-height: 1.9; color: #495057; }
.sk-t .sk-dim { color: #adb5bd; }
/* ①価格の3択（しない／安全な分だけ／🔴すべて） */
.sk-radio { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.7;
  border: 1px solid #ecebef; border-radius: 8px; padding: 11px 13px; margin-bottom: 8px; cursor: pointer; }
.sk-radio:hover { background: #fafafa; }
.sk-radio input { width: 18px; height: 18px; margin-top: 2px; cursor: pointer; flex: none; }
.sk-radio span { display: block; }
.sk-radio i { display: block; font-style: normal; font-size: 12px; color: #868e96; margin-top: 3px; }
.sk-radio .sk-num { color: #c2255c; font-size: 20px; margin-left: 8px; }
.sk-radio-key { border: 2px solid #f0b4c8; background: #fffafc; }
.sk-radio .sk-warn-i { color: #e03131; }
.sk-radio .sk-ok-i { color: #0ca678; }
/* 🎯 いま何点→何点になるか（金額でも） */
.sk-plan-hero { display: flex; align-items: center; gap: 18px; margin: 10px 0 12px; flex-wrap: wrap; }
.sk-plan-now, .sk-plan-after { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sk-plan-now span, .sk-plan-after span { font-size: 12px; color: #868e96; }
.sk-plan-now b { font-size: 30px; font-weight: 800; color: #868e96; }
.sk-plan-after b { font-size: 34px; font-weight: 800; color: #c2255c; }
.sk-plan-now i, .sk-plan-after i { display: block; width: 100%; font-style: normal;
  font-size: 13px; font-weight: 700; color: #495057; }
.sk-plan-after i { color: #c2255c; }
.sk-plan-arrow { font-size: 24px; color: #adb5bd; }
.sk-plan-price { display: flex; align-items: center; gap: 6px; font-size: 13px;
  margin: 10px 0; flex-wrap: wrap; }
.sk-plan-price input { width: 80px; padding: 6px 8px; font-size: 14px; text-align: right;
  border: 1px solid #dee2e6; border-radius: 6px; }
.sk-stop { padding: 5px 12px; font-size: 12px; font-weight: 700; color: #a61e4d;
  background: #fff0f5; border: 1px solid #f0b4c8; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.sk-stop:disabled { color: #868e96; background: #f1f3f5; border-color: #dee2e6; cursor: default; }
.sk-stop.sk-stopped { color: #0ca678; background: #e6f7ee; border-color: #b2f2bb; }
.sk-plan-t .sk-only { color: #c2255c; font-weight: 800; }
.sk-plan-t thead th { font-size: 11px; color: #868e96; font-weight: 700; padding: 4px 8px; }
  border: 1px solid #f0b4c8; border-radius: 8px; padding: 11px 13px; margin: 0 0 10px; }
  color: #fff; background: #c2255c; border: none; border-radius: 8px; cursor: pointer; }
/* 実績から自動で弾いている言葉（久美さんが選ばなくてよい） */
/* 📢 お知らせ（久美さんが外注さんに書く掲示板） */
.board-box { margin: 0 0 10px; }
/* 🧮 今日の仕分け点数／上限（外注さんの画面） */
.rq-capbar { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #f4eefb; color: #6741a8; border: 1px solid #d0bdec; font-size: 13px; }
.rq-capbar-full { background: #fff4e6; color: #b5710e; border-color: #ffd8a8; }
.board-details { background: #fffdf5; border: 1px solid #ffe8a3; border-radius: 10px; padding: 10px 14px; }
.board-sum { font-size: 15px; font-weight: 800; color: #9a6b00;
  display: flex; align-items: center; gap: 12px; padding-bottom: 4px; }
.board-add { font-size: 12px; font-weight: 700; color: #9a6b00; background: #fff;
  border: 1px solid #ffd8a8; border-radius: 6px; padding: 4px 12px; cursor: pointer; }
/* 1件ずつ折りたたみ。ふだんはタイトルだけ、押すと本文が出る */
.board-item { border-top: 1px solid #ffe8a3; }
.board-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 14px; color: #343a40; cursor: pointer; padding: 9px 2px; list-style: none; }
.board-head::-webkit-details-marker { display: none; }
/* 押せることが分かるように、自前で ▶ ▼ を出す（flex だと標準の印が消えるため） */
.board-head::before { content: "▶"; font-size: 9px; color: #c99a2e; }
.board-item[open] > .board-head::before { content: "▼"; }
.board-head:hover { background: #fff9e6; }
.board-item[open] > .board-head { color: #9a6b00; }
.board-title { font-weight: 700; }
.board-date { font-size: 12px; color: #868e96; font-variant-numeric: tabular-nums; }
.board-badge { font-size: 10px; font-weight: 800; color: #fff; background: #e03131;
  border-radius: 4px; padding: 1px 6px; }
.board-cnt { font-size: 11px; color: #868e96; margin-left: auto; }
.board-body { font-size: 14px; line-height: 1.9; color: #343a40;
  margin: 0 0 4px; padding: 8px 10px; background: #fff; border-radius: 6px; white-space: normal; }
.board-tools { margin-left: auto; display: flex; gap: 6px; }
.board-tools button { font-size: 11px; color: #868e96; background: #fff; border: 1px solid #dee2e6;
  border-radius: 5px; padding: 3px 9px; cursor: pointer; }
.board-none { font-size: 13px; color: #868e96; padding: 10px 0 2px; }
.board-hint { font-size: 12px; color: #868e96; line-height: 1.8; }
.board-read { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 0 2px; font-size: 12px; }
.board-ok { color: #0b7a43; font-weight: 700; }
.board-yet { color: #868e96; }
.board-ack { font-size: 12px; font-weight: 700; color: #fff; background: #9a6b00;
  border: none; border-radius: 6px; padding: 5px 14px; cursor: pointer; }
.board-ack:disabled { background: #dee2e6; }
.board-pop-item { border-bottom: 1px solid #f1f3f5; padding: 0 0 14px; margin-bottom: 14px; }
.board-pop-item:last-of-type { border-bottom: none; }
.board-pop-t { font-size: 16px; font-weight: 800; color: #9a6b00; }
.board-pop-d { font-size: 12px; color: #868e96; margin: 2px 0 8px; }
.board-pop-b { font-size: 15px; line-height: 2; color: #343a40; }
.board-pop-note { font-size: 13px; color: #495057; background: #fffdf5; border: 1px solid #ffe8a3;
  border-radius: 8px; padding: 10px 12px; line-height: 1.8; }

/* 着払いを割った時の「変わらなかった商品」（理由つき）。
   2026-10-02 鳴島さん「これだけSKUが計算されなかったの何でだろ？」
   変わった分しか出していなかったので、変わらない1点は聞かないと分からなかった。 */
.sku-keep { margin-top: 12px; border: 1px solid #d8e6dd; border-radius: 8px; background: #f4fbf6; padding: 10px 12px; }
.sku-keep-h { font-size: 13px; font-weight: 800; color: #0b7a43; margin-bottom: 6px; }
.sku-keep-row { font-size: 12.5px; line-height: 1.7; padding: 6px 0; border-top: 1px dashed #d8e6dd; }
.sku-keep-row:first-of-type { border-top: 0; }
.sku-keep-sku { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; color: #1f2a44; }
.sku-keep-why { color: #0b7a43; font-weight: 700; }
.sku-keep-money { color: #666; }

/* 再計算のそばに出す「いまのSKU」と、Amazon登録済みの注意。
   2026-10-02 くみ「損益再計算ボタン押したらSKU変わっちゃった
   こういうときどうやって戻したら良い？」 */
.sku-now { font-size: 12px; color: #495057; margin-top: 4px; word-break: break-all; }
.sku-now span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #1f2a44; font-weight: 700; }
.sku-fixed-warn { margin-top: 6px; padding: 8px 10px; border: 1px solid #f3c9c9; border-radius: 8px;
  background: #fff5f5; color: #a83232; font-size: 12px; line-height: 1.7; }
/* 変更履歴の「↩ このSKUに戻す」 */
.hist-undo { margin-left: 6px; font-size: 11px; padding: 2px 8px; border: 1px solid #f7c6da;
  border-radius: 999px; background: #fff; color: #c2255c; font-weight: 700; cursor: pointer; }
.hist-undo:hover { background: #fff0f6; }
.hist-undo:disabled { opacity: .5; cursor: default; }

/* 終了日時は押すと直せる（チェッカーの値がヤフオクと食い違う時のため）。
   2026-10-02 くみ「これ10/8終了なんだけどな〜」 */
.rq-endbtn { font: inherit; color: inherit; background: none; border: 0; padding: 2px 3px;
  border-radius: 5px; cursor: pointer; line-height: 1.3; width: 100%; text-align: center; }
.rq-endbtn:hover { background: #fff0e6; outline: 1px solid #f0c0a0; }
.rq-endbtn-man { font-weight: 700; }
.rq-endman { color: #0b7a43; margin-left: 2px; }
/* 出品IDで調べた時の「出てこない理由」 */
.rq-find-why { margin: 4px 0 0; padding-left: 20px; line-height: 1.8; }
.rq-find-why li { margin-bottom: 2px; }

/* 納品の一括バーの使い方メモ（☑を入れると指示書・サンクスレターがその分だけになる）。
   2026-10-03 鳴島さん「選択できず今までと同じ印刷画面になってしまいます」 */
.ship-bulk-note { font-size: 11.5px; color: #868e96; line-height: 1.5; }
@media (max-width: 760px) { .ship-bulk-note { flex: 1 1 100%; } }

/* 📈分析：いま弾いている言葉の一覧と、🔀違う商品／📄付属品だけの案。
   2026-10-03 くみ「これわかりづらいから弾いた言葉一覧っていうのでまとめてくれんか？」
   2026-10-03 くみ「商品違いと付属品のみはだいぶ精査できるはずだよ」 */
.sk-sub2 { margin-top: 14px; font-size: 13.5px; font-weight: 800; color: #1f2a44; }
.sk-sfx { color: #c2255c; font-weight: 800; }
.sk-ex { font-size: 11.5px; color: #868e96; margin-top: 2px; word-break: break-all; }
.sk-woff, .sk-cfadd { font-size: 12px; padding: 4px 10px; border: 1px solid #f0c6d6;
  border-radius: 999px; background: #fff; color: #c2255c; font-weight: 700; cursor: pointer; }
.sk-woff:hover, .sk-cfadd:hover { background: #fff0f6; }
.sk-woff:disabled, .sk-cfadd:disabled { opacity: .5; cursor: default; }
/* 見送りCSVの書き出しリンク（2026-10-03 くみ「見送りにしたデータCSVとかで出せる？」） */
.sk-csv { float: right; font-size: 12.5px; font-weight: 700; color: #c2255c;
  text-decoration: none; border: 1px solid #f0c6d6; border-radius: 999px; padding: 4px 12px; background: #fff; }
.sk-csv:hover { background: #fff0f6; }

/* リサーチの別枠（DSなど）のチップと印。
   2026-10-03 くみ「DSとかよく拾ってるものをリサーチ担当は見えずに私だけ見えるようにできない？」
             くみ「DSリサーチ枠だけ別に欲しいって感じ」 */
.rq-lanechips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 20px 6px; }
.rq-lanechip { font-size: 12px; font-weight: 700; color: #5f3dc4; background: #fff;
  border: 1px solid #d0c4f0; border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.rq-lanechip:hover { background: #f3f0ff; }
.rq-lanechip.on { background: #5f3dc4; border-color: #5f3dc4; color: #fff; }
.rq-lane-clear { color: #868e96; border-color: #dee2e6; }
.rq-lanebadge { font-size: 10.5px; font-weight: 700; color: #5f3dc4; background: #f3f0ff;
  border: 1px solid #d0c4f0; border-radius: 4px; padding: 0 4px; white-space: nowrap; }
/* 📨 出品者に質問して返事待ちの候補。二重に質問しないための印。
   2026-10-06 くみ「ほっとくと他の人がやっちゃうかもしれないから」 */
.rq-askbadge { font-size: 10.5px; font-weight: 700; color: #1864ab; background: #e7f5ff;
  border: 1px solid #a5d8ff; border-radius: 4px; padding: 0 4px; white-space: nowrap; }
.rq-askmine { color: #0b7a43; background: #ebfbee; border-color: #b2f2bb; }
/* 3日以上返事が来ていない分は目立たせる（置きっぱなしに気づけるように） */
.rq-askold { color: #c92a2a; background: #fff5f5; border-color: #ffc9c9; font-weight: 800; }
.ss-grid .ss-defect { color: #c92a2a; font-weight: 800; }

/* マスタ設定の分類と、リサーチ画面からの入り口。
   2026-10-03 くみ「マスタ設定ごちゃごちゃしすぎで分かりづらいから、
   それはリサーチ画面から設定したいのだけど。」
   「マスタ画面も、納品に関係あるもの、仕入れに関係あるもの、ユーザーなど分類してほしい。見づらい。」 */
.st-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 10px 12px; background: #fff; border: 1px solid #ecdfe4; border-radius: 10px; }
.st-nav b { font-size: 12.5px; color: #868e96; margin-right: 2px; }
.st-nav button { font-size: 12.5px; font-weight: 700; color: #a61e5d; background: #fff0f6;
  border: 1px solid #f7c6da; border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.st-nav button:hover { background: #ffdeeb; }
.st-group { margin-bottom: 22px; }
.st-group-h { font-size: 15px; font-weight: 800; color: #1f2a44; margin: 0 0 8px;
  padding: 7px 12px; background: #f6f2f4; border-left: 5px solid #f29ab9; border-radius: 0 8px 8px 0; }

/* マスタ設定：見出しは短い名前だけ、説明は開いた中に出す。
   2026-10-03 くみ「あと説明文が長過ぎる」「この辺もひどい」 */
.st-note { font-size: 12px; color: #868e96; line-height: 1.75; margin: 2px 2px 8px;
  padding: 8px 10px; background: #fafafa; border: 1px solid #eee; border-radius: 8px; }
/* リサーチ画面のポップアップの中の設定（マスタ設定と同じ表） */
.rq-setbody { display: block; }
.rq-setbody .settings-block { margin-bottom: 8px; }

/* 型番の欄の下の「SKUにはこう入ります」。
   2026-10-06 くみ「/とか()とかが型番に入ってたら-に変換できたりしない？」 */
.sku-mhint { font-size: 12px; line-height: 1.5; margin-top: 4px; }
.sku-mhint-ok { color: #2b8a3e; }
.sku-mhint-ng { color: #c92a2a; font-weight: 700; }

/* リサーチの別枠（ASINを1つずつ足す）。
   2026-10-08 くみ「ASIN入れる、エンターオス、反映されるみたいなのできんか？」 */
.lane-card { border: 1px solid #e9ecef; border-radius: 10px; padding: 12px 14px; margin: 10px 0; background: #fff; }
.lane-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.lane-name { font-size: 15px; font-weight: 700; padding: 7px 10px; border: 1px solid #dee2e6; border-radius: 6px; width: 200px; }
.lane-who { padding: 7px 8px; border: 1px solid #dee2e6; border-radius: 6px; font-size: 13px; }
.lane-wholb { font-size: 12px; color: #868e96; }
.lane-n { font-size: 12px; color: #868e96; margin-left: auto; }
.lane-rm { font-size: 12px; color: #c92a2a; background: #fff5f5; border: 1px solid #ffc9c9; border-radius: 6px; padding: 5px 10px; cursor: pointer; }
/* 別枠の中身はたたんでおく（3DSのように数十件入る枠があるため） */
.lane-list { margin-bottom: 10px; }
.lane-listsum { cursor: pointer; font-size: 12px; font-weight: 700; color: #5f3dc4; padding: 5px 2px; list-style: revert; }
.lane-listsum::marker { color: #b197fc; }
.lane-listsum:hover { color: #3b1d9e; }
.lane-list[open] .lane-chips { max-height: 320px; overflow-y: auto; padding: 4px 2px; }
.lane-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.lane-chip { display: inline-flex; align-items: center; gap: 6px; background: #f3f0ff; border: 1px solid #d0c4f0;
  border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 12px; color: #5f3dc4; max-width: 100%; }
.lane-chip b { font-weight: 700; }
.lane-chip i { font-style: normal; color: #868e96; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-del { border: none; background: #fff; color: #868e96; border-radius: 50%; width: 18px; height: 18px;
  line-height: 1; cursor: pointer; font-size: 12px; }
.lane-del:hover { background: #ffe3e3; color: #c92a2a; }
.lane-none { font-size: 12px; color: #adb5bd; }
.lane-addrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lane-add { flex: 1 1 300px; max-width: 420px; padding: 8px 10px; font-size: 13px; border: 1px solid #dee2e6; border-radius: 6px; }
.lane-msg { font-size: 12px; color: #2b8a3e; }
.lane-new { margin-top: 6px; padding: 8px 14px; font-size: 13px; font-weight: 700; color: #5f3dc4;
  background: #f3f0ff; border: 1px solid #d0c4f0; border-radius: 6px; cursor: pointer; }

/* 月額予算は支払予定とは独立。狭い画面でも入力欄を折り返す。 */
.cp-budget-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin:16px 0}
.cp-budget-grid .cp-set{display:flex;flex-direction:column;align-items:stretch;gap:6px;margin:0}
.cp-budget-grid input{width:100%;box-sizing:border-box}

/* 今週の確認・使えるお金（最初のタブ）。スマホでも1列で読めるように */
.cpw-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:6px 0 10px}
.cpw-tile{border:1px solid #eef1f5;border-radius:12px;padding:12px 14px;background:#fff}
.cpw-l{font-size:12px;color:#5c6370;font-weight:700}
.cpw-v{font-size:22px;font-weight:800;color:#1f2a44;font-variant-numeric:tabular-nums;margin:2px 0}
.cpw-s{font-size:12px;color:#5c6370;line-height:1.5}
.cpw-bad{border-color:#f3b9b9;background:#fff5f5}.cpw-bad .cpw-v{color:#c92a2a}
.cpw-unk{border-color:#ffe08a;background:#fffbea}.cpw-unk .cpw-v{color:#8a6100}
.cpw-good{border-color:#b2e2c4;background:#f3fbf6}.cpw-good .cpw-v{color:#1b7a43}
.cpw-why{font-size:13px;line-height:1.7;color:#3b4252;margin:4px 0 14px}
.cpw-h{margin:22px 0 8px;font-size:16px;scroll-margin-top:70px}
.cpw-steps{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}
.cpw-steps li{display:flex;gap:10px;align-items:flex-start;border:1px solid #ead7df;background:#fdf7fa;border-radius:10px;padding:10px 12px;line-height:1.6;font-size:14px}
.cpw-steps li.cpw-info{background:#f8f9fa;border-color:#e9ecef;color:#495057}
.cpw-n{flex:none;width:24px;height:24px;border-radius:50%;background:#922d50;color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:13px}
.cpw-info .cpw-n{background:#868e96}
.cpw-acts{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:6px}
.cpw-acts input{min-height:32px;max-width:150px}
.cpw-or{font-size:12px;color:#868e96}
.cpw-pickm{min-height:32px;max-width:100%}
.cpw-go,.cpw-mini,.cpw-form button,.cpw-primary{border:0;border-radius:8px;background:#922d50;color:#fff;padding:7px 12px;cursor:pointer;font-size:13px;text-decoration:none;display:inline-block}
.cpw-mini{background:#fff;color:#922d50;border:1px solid #d9a5b8}
.cpw-primary{padding:11px 18px;font-size:14px;margin:10px 8px 0 0}
.cpw-primary:disabled{opacity:.45;cursor:default}
.cpw-done{font-size:15px;color:#1b7a43;font-weight:700}
.cpw-drop{display:block;border:2px dashed #d9a5b8;border-radius:12px;padding:22px 16px;text-align:center;cursor:pointer;background:#fdf7fa;color:#922d50}
.cpw-drop.on{background:#f8e1ea}
.cpw-drop{position:relative}
.cpw-drop input{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden}
.cpw-hint{font-size:12px;color:#5c6370;line-height:1.7;margin:6px 0}
.cpw-preview,.cpw-result{border:1px solid #ead7df;border-radius:12px;padding:12px;margin:12px 0;background:#fff}
.cpw-result{border-color:#b2e2c4;background:#f3fbf6;line-height:1.7}
.cpw-scroll{overflow-x:auto}
.cpw-preview td,.cpw-result td,.cpw-more td{white-space:normal;vertical-align:top}
.cpw-preview td:first-child{word-break:break-all;min-width:140px}
.cpw-skip td{color:#868e96}
.cpw-warn{font-size:12px;color:#8a6100;margin-top:4px;line-height:1.5}
.cpw-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;padding:14px;background:#faf7f9;border:1px solid #ead7df;border-radius:12px;align-items:end}
.cpw-form label{display:flex;flex-direction:column;gap:6px;font-size:13px}
.cpw-form input,.cpw-form select{width:100%;box-sizing:border-box;min-height:38px}
.cpw-form .cpw-chk{flex-direction:row;align-items:center;grid-column:1/-1}
.cpw-form .cpw-chk input{width:auto;min-height:0}
.cpw-form p{grid-column:1/-1;margin:0}
.cpw-more{margin:14px 0;border:1px solid #eef1f5;border-radius:10px;padding:8px 12px}
.cpw-more summary{cursor:pointer;font-weight:700;font-size:14px}
.cpw-gap{color:#adb5bd;text-align:center}
.cpw-bar{height:6px;background:#f1f3f5;border-radius:3px;margin-bottom:3px;min-width:80px}
.cpw-bar span{display:block;height:6px;background:#922d50;border-radius:3px}
td small{display:block;color:#868e96;font-size:11px}

/* 日別売上表の一番下の合計行 */
.ana-tbl tr.ana-total td{font-weight:800;border-top:2px solid #dee2e6;background:#f8f9fa;position:sticky;bottom:0;z-index:1}
.ana-goal-ok{color:#1b7a43;font-weight:800}
.ana-goal-ng{color:#c92a2a;font-weight:800}
.ana-goal-edit{margin-left:8px;border:1px solid #d9a5b8;background:#fff;color:#922d50;border-radius:6px;padding:2px 8px;font-size:12px;cursor:pointer}
.cpw-hold{border:1px solid #ffe08a;background:#fffbea;border-radius:12px;padding:10px 14px;margin:6px 0 12px;line-height:1.6}
.cpw-hold p{margin:0 0 6px}
.cp-budget-details {grid-template-columns:repeat(auto-fit,minmax(320px,1fr));align-items:start}.cp-budget-details .cp-set {border:1px solid #ddd;padding:14px;border-radius:10px}.cp-budget-item{display:grid;grid-template-columns:minmax(100px,1fr) 110px auto;gap:6px;margin:8px 0}.cp-budget-item input{min-width:0;width:100%;box-sizing:border-box}.cp-budget-details h4{margin:0 0 8px}.cp-budget-details input[readonly]{background:#f5f5f5;font-weight:bold}.cp-budget-details label{display:block;margin-top:10px}@media(max-width:420px){.cp-budget-details{grid-template-columns:1fr}.cp-budget-item{grid-template-columns:minmax(80px,1fr) 85px auto}}
.cp-budget-item.cp-unsplit input{background:#fffbea;border-color:#ffe08a}
.cp-budget-diff{border:1px solid #ead7df;background:#fdf7fa;border-radius:10px;padding:10px 12px;margin:8px 0}
.cp-budget-diff tr.cp-diff-on td{font-weight:800;color:#922d50}
.cp-budget-item .cp-item-name{text-align:left}

/* 🎯 商品別の除外ワード */
.aw-panel{border:1px solid #ead7df;border-radius:10px;padding:10px 12px;margin-top:8px;background:#fdf7fa;line-height:1.6}
.aw-head{margin-bottom:6px}.aw-sub{font-size:12px;color:#5c6370}.aw-model{font-size:12px;color:#5c6370}
.aw-words{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.aw-chip{display:inline-flex;align-items:center;gap:4px;background:#fff;border:1px solid #d9a5b8;border-radius:14px;padding:2px 4px 2px 10px;font-weight:700}
.aw-del{border:0;background:none;color:#922d50;cursor:pointer;font-size:14px}
.aw-add{display:flex;gap:6px;flex-wrap:wrap}.aw-add input{min-width:200px}
.aw-count{margin:8px 0 4px;font-size:13px}.aw-warn{color:#c92a2a;font-weight:700;font-size:13px;margin:4px 0}
.aw-titles{margin:4px 0 6px 18px;font-size:12px}.aw-tw{color:#868e96}
.aw-save-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:8px 0}
.aw-save{border:0;border-radius:8px;background:#922d50;color:#fff;padding:7px 14px;cursor:pointer}.aw-save:disabled{opacity:.45;cursor:default}
.aw-dirty{color:#8a6100;font-size:12px;font-weight:700}.aw-msg{font-size:12px;color:#1b7a43}
.aw-none{color:#868e96;font-size:13px}.aw-ex summary{cursor:pointer;font-weight:700;font-size:13px}
.aw-restore{border:1px solid #d9a5b8;background:#fff;color:#922d50;border-radius:6px;padding:2px 8px;cursor:pointer}

/* 日ごとの点数：入札候補・見送りの内訳（くみ 2026-10-18） */
.rsd-k{display:block;font-size:11px;color:#868e96;line-height:1.3;margin:1px 0 2px;white-space:nowrap}
.rsd-kb{color:#2b8a3e;font-weight:700}.rsd-ks{color:#868e96}
.rsd-legend{font-size:11px;color:#868e96;margin:2px 0 6px}
.rsd-tot .rsd-k{font-size:11px}

/* 🎯 商品別の除外ワードの効き目（2026-10-18） */
.aw-effect { background: #eef7f0; border: 1px solid #c8e6cf; border-radius: 8px; padding: 8px 12px; margin: 6px 0 10px; font-size: 13px; color: #2b6a3a; }
.aw-effect-n { display: block; font-size: 11.5px; color: #6c8a73; margin-top: 2px; }
.aw-wn { font-size: 11.5px; color: #2b8a3e; font-weight: 700; }
.aw-num { text-align: right; white-space: nowrap; }

/* 🏷 ジャンル別の除外ワード（2026-10-21） */
.gw-note{background:#fff9db;border:1px solid #ffe066;border-radius:8px;padding:6px 10px;font-size:12.5px;margin:6px 0}
.gw-msg{background:#ebfbee;border:1px solid #b2f2bb;border-radius:8px;padding:6px 10px;font-size:12.5px;margin:6px 0;color:#1b7a43}
.gw-t td{vertical-align:top}
.gw-on{display:inline-block;font-size:11px;font-weight:700;color:#fff;background:#2b8a3e;border-radius:10px;padding:0 8px}
.gw-off{display:inline-block;font-size:11px;font-weight:700;color:#868e96;background:#f1f3f5;border-radius:10px;padding:0 8px}
.gw-dim{font-size:11.5px;color:#868e96}
.gw-btns{white-space:nowrap}.gw-btns button{margin:2px 0;display:block}
.gw-toggle{border:1px solid #d9a5b8;background:#fff;color:#922d50;border-radius:8px;padding:6px 10px;cursor:pointer;font-size:12px}
.gw-toggle-on{background:#fff0f6}
.gw-close{border:1px solid #dee2e6;background:#fff;color:#495057;border-radius:8px;padding:6px 10px;cursor:pointer}
.gw-panel label{display:block;font-weight:700;font-size:12.5px;color:#495057;margin-bottom:2px}
.gw-row{margin:8px 0}.gw-name{min-width:260px}
.gw-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:700px){.gw-two{grid-template-columns:1fr}}
.gw-glist{max-height:200px;overflow:auto;border:1px solid #ead7df;border-radius:8px;background:#fff;padding:4px 8px;margin-top:4px}
.gw-g{display:flex!important;align-items:center;gap:6px;font-weight:400!important;font-size:12.5px!important;padding:2px 0;cursor:pointer}
.gw-preview{border-top:1px dashed #ead7df;margin-top:8px;padding-top:6px}
.gw-stale{opacity:.55}
.gw-xprod{border:1px solid #dee2e6;background:#fff;border-radius:6px;font-size:11px;padding:0 6px;cursor:pointer}
.gw-prods summary{display:inline;cursor:pointer;font-size:12px;color:#922d50;margin-left:6px}
.gw-preview summary{font-size:13px;font-weight:700;cursor:pointer;margin-top:4px}
.gw-preview .gw-prods summary{font-size:12px;font-weight:400}
@media (max-width:640px){
  .gw-t thead{display:none}
  .gw-t tr{display:block;border-bottom:1px solid #ecebef;padding:4px 0}
  .gw-t td{display:block;border:0;padding:3px 8px}
  .gw-t td.aw-num{display:inline-block;text-align:left}
  .gw-t td.aw-num::before{content:attr(data-l) " ";color:#868e96;font-size:11px}
  .gw-btns button{display:inline-block;margin-right:6px}
}
.sk-t tr.sk-flea-on td{background:#fff4e6}
/* 📦 在庫待ち（保留・在庫がまだある）2026-10-22 */
.rq-stockwait{display:inline-block;font-size:11px;font-weight:700;color:#5c6370;background:#f1f3f5;border:1px solid #dee2e6;border-radius:10px;padding:0 6px}
.rq-stockback{display:inline-block;font-size:11px;font-weight:700;color:#fff;background:#e8590c;border-radius:10px;padding:0 6px}
/* 📊 今の設定なら（2026-10-22） */
.sk-sim{border:2px solid #c5e1f5;background:#f5fbff}
.sk-sim-big{font-size:15px;margin:2px 0 6px}.sk-sim-big b{font-size:18px;color:#1c5d8c}
.sk-sim-yen{margin-left:10px;font-weight:700;color:#2b8a3e}
.sk-sim-bar{display:flex;height:10px;background:#e9ecef;border-radius:5px;overflow:hidden;margin:4px 0}
.sk-sim-bar i{display:block;height:100%}
.sk-sim-done{background:#1c7ed6}.sk-sim-hit{background:#74c0fc}
.sk-sim-key{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:4px;vertical-align:-1px}
.sk-sim-bar{gap:2px}
.sk-swrow{margin:6px 0;font-size:13px}.sk-swrow select{margin:0 4px}
/* 🔨 ヤフオクだけ止める（2026-10-22） */
.mw-yoff,.mw-yon{border:1px solid #f0b4c8;background:#fff;color:#a61e4d;border-radius:8px;padding:6px 10px;font-weight:700;cursor:pointer}
.mw-yoff:disabled,.mw-yon:disabled{opacity:.45;cursor:default}
.mw-yofftag{display:inline-block;margin-left:6px;font-size:10.5px;font-weight:700;color:#fff;background:#c2255c;border-radius:8px;padding:0 6px}
.mw-sub{font-size:10.5px;color:#868e96;font-weight:400;white-space:nowrap}
/* いま弾いているもの：アコーディオン（2026-10-23） */
.sk-now .sk-acc > .sk-card-h{cursor:pointer;user-select:none;margin-bottom:0;display:flex;align-items:center;gap:6px}
.sk-now .sk-acc > .sk-card-h::before{content:"▾";color:#adb5bd;font-size:12px;width:12px;flex:none}
.sk-now .sk-acc.sk-closed > .sk-card-h::before{content:"▸"}
.sk-now .sk-acc:not(.sk-closed) > .sk-card-h{margin-bottom:10px}
.sk-now .sk-acc.sk-closed > :not(.sk-card-h){display:none !important}
.sk-now .sk-acc.sk-closed{padding-top:12px;padding-bottom:12px}
.sk-now .sk-acc.sk-closed{margin-bottom:6px}
.mw-cofftag{background:#5c6370}
.mw-sortable{cursor:pointer;user-select:none}.mw-sortable:hover{color:#a61e4d}
/* 🧹 別枠の除外設定（2026-10-23） */
.rq-lane-rules{background:#fff4e6;border-color:#ffd8a8;color:#b5710e;font-weight:700}
.rq-lanereview{display:inline-block;font-size:11px;font-weight:700;color:#fff;background:#f08c00;border-radius:10px;padding:0 6px}
.lr-body{line-height:1.6}
.lr-rule{border:1px solid #ead7df;border-radius:10px;padding:8px 12px;margin:8px 0;background:#fdf7fa}
.lr-on{display:flex;align-items:center;gap:6px;font-size:14px;cursor:pointer}
.lr-wtxt{cursor:pointer}
.lr-t td{vertical-align:top;font-size:12.5px}
.gw-preview details>summary{font-size:13px;font-weight:700;cursor:pointer;margin:6px 0}

.mw-asin{font-size:12px;color:#555;white-space:nowrap}.mw-asin .copy-val{margin-left:2px}
