/* list-page.css — index.html / special.html 共通（2026-09-21 に index.html の <style> から切り出し）。⚠️ 共通ファイル */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #0d2473;
  --navy-dark:   #091a56;
  --accent:      #f26522;
  --accent-dark: #d4551a;
  --accent-bg:   #fff1eb;
  --bg:          #f5f6f8;
  --card:        #ffffff;
  --border:      #e2e4ea;
  --text:        #141413;
  --muted:       #6b6b68;
  --yes:         #166534;
  --yes-bg:      #dcfce7;
  --no:          #6b6b68;
  --danger:      #991b1b;
  --danger-bg:   #fee2e2;
  --warn:        #92400e;
  --warn-bg:     #fef3c7;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-weight: 400;
}

/* ── Header ── */
header {
  background: var(--navy);
  color: #fff;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.header-logo {
  height: 44px; width: auto; display: block; flex-shrink: 0;
  background: #fff; padding: 5px 10px; border-radius: 6px;
}
.header-logo-link {
  display: block; flex-shrink: 0; line-height: 0;
  transition: opacity 0.15s ease;
}
.header-logo-link:hover { opacity: 0.85; }
.header-logo-link:focus-visible {
  outline: 2px solid rgba(255,255,255,0.6); outline-offset: 3px; border-radius: 6px;
}
.header-divider { width: 1px; height: 28px; background: rgba(255,255,255,0.25); flex-shrink: 0; }
.header-text h1 { font-size: 1rem; font-weight: 700; }
.header-text p  { font-size: 0.75rem; opacity: 0.65; margin-top: 2px; font-weight: 300; }

/* ── Main layout ── */
main { max-width: 1400px; margin: 0 auto; padding: 24px 16px 80px; }

/* ── Sticky filter wrapper ──
   ★張り付かせてよいのは、画面の高さに対して十分低いときだけ（2026-10-20）。
     スマホでは絞り込み欄が 1,201px（画面 812px）あり、一番下まで送ると表がまるごと裏に隠れていた。
     PC でも表の見出しが裏に入っていた。張り付かせるかどうかと表の高さは js/list-page.js の fitTables() が決める */
.filter-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  padding-bottom: 4px;
}
.filter-sticky.is-static { position: static; }
@media (max-width: 768px) {
  .filter-sticky { position: static; }
}

/* ── Filter panel ── */
.filter-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
}
.fg { display: flex; flex-direction: column; gap: 6px; }
.fg label {
  font-size: 0.7rem; font-weight: 500;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em;
}
.fg input[type="text"] {
  padding: 8px 12px; border: 1px solid var(--border);
  font-size: 0.875rem; width: 220px; outline: none;
  transition: border-color 0.15s ease; color: var(--text);
}
.fg input[type="text"]:focus { border-color: var(--accent); }

/* Tab buttons */
.tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.tab {
  padding: 5px 13px; border: 1px solid var(--border);
  background: #fff; font-size: 0.82rem; font-weight: 400;
  cursor: pointer; color: var(--muted); transition: all 0.15s ease; white-space: nowrap;
}
.tab:hover { border-color: var(--accent); color: var(--accent); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }

/* Dropdown select */
.fg select {
  padding: 7px 28px 7px 12px;
  border: 1px solid var(--border);
  font-size: 0.875rem; color: var(--text);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%236b6b68' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 10px center;
  background-size: 8px; cursor: pointer; outline: none;
  -webkit-appearance: none; appearance: none; min-width: 130px;
}
.fg select:focus { border-color: var(--accent); }

/* Checkbox */
.cb-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.cb-wrap input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.cb-wrap span { font-size: 0.875rem; font-weight: 400; user-select: none; }

/* ── Stats + action bar ── */
.action-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; padding: 0 2px; flex-wrap: wrap; gap: 10px;
}
.count { font-size: 0.82rem; color: var(--muted); }
.count strong { color: var(--text); font-weight: 700; }

#inquire-btn {
  display: none;
  padding: 9px 20px;
  background: var(--accent); color: #fff;
  border: none;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s ease;
}
#inquire-btn:hover { background: var(--accent-dark); }
#inquire-btn.visible { display: inline-flex; align-items: center; gap: 6px; }

/* ── Table ── */
.table-wrap {
  background: var(--card); border: 1px solid var(--border);
  overflow: hidden;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%; border-collapse: collapse;
  font-size: 0.875rem; min-width: 960px;
}
thead {
  background: var(--bg); border-bottom: 1px solid var(--border);
}
thead th {
  padding: 11px 14px; text-align: left;
  font-size: 0.7rem; font-weight: 500;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em;
  white-space: nowrap;
}
thead th:first-child { width: 44px; text-align: center; }

tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s ease; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover:not(.oos):not(.sold) { background: var(--bg); }

tbody tr.oos { opacity: 0.35; pointer-events: none; }

tbody tr.selected { background: var(--accent-bg) !important; }

td { padding: 11px 14px; vertical-align: middle; white-space: nowrap; }
td:first-child { text-align: center; }

/* Row checkbox */
.row-cb { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* Badge */
.badge {
  display: inline-block; padding: 2px 9px; border: 1px solid var(--border);
  font-size: 0.72rem; font-weight: 500;
}
.badge-a4   { border-color: var(--accent); color: var(--accent); }
.badge-a5   { border-color: #b45309; color: #b45309; }
.badge-tab  { border-color: #2563eb; color: #2563eb; }
.badge-dt   { border-color: #6d28d9; color: #6d28d9; }
.badge-other { }

/* Stock */
.stock { font-weight: 700; font-size: 0.95rem; }
.stock-zero { color: var(--danger); }
.stock-low  { color: var(--warn); }
.stock-ok   { color: var(--yes); }

/* Product name */
.pname { font-weight: 600; }
.pname-cell { display: flex; align-items: center; gap: 7px; }
.clickable-name { cursor: pointer; }
.clickable-name:hover { text-decoration: underline; color: var(--accent); }
/* 品名は詳細を開くボタン（2026-10-20）。見た目は文字のまま、キーボードでも押せる */
button.pname {
  background: none; border: 0; padding: 0; margin: 0;
  /* ★font をまとめて inherit にすると .pname の太字まで消える（2026-10-20 に画面で気づいた）。家族と大きさだけ引き継ぐ */
  font-family: inherit; font-size: inherit; line-height: inherit; color: inherit; text-align: left; cursor: pointer;
}
button.pname:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.cpu-sub { font-size: 0.75rem; color: var(--muted); margin-top: 1px; font-weight: 300; }

/* Rank badge */
.rank-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  padding: 1px 6px; flex-shrink: 0; cursor: default;
}
.rank-S { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.rank-A { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
.rank-B { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.rank-C { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.rank-J { background: #fce7f3; color: #9d174d; border: 1px solid #fbcfe8; }

/* Rank legend */
.rank-legend {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 10px 16px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 0.75rem;
}
.rank-legend-label {
  font-size: 0.68rem; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.14em; white-space: nowrap;
}
.rank-legend-items { display: flex; flex-wrap: wrap; gap: 8px; }
.rank-legend-item { display: flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--muted); }

/* Maker column */
.maker-cell { color: var(--muted); font-size: 0.84rem; font-weight: 400; white-space: nowrap; }

/* Negotiating badge & row */
.badge-negotiating {
  display: inline-block; padding: 1px 7px;
  font-size: 0.68rem; font-weight: 700;
  background: var(--warn-bg); color: var(--warn);
  border: 1px solid #fcd34d; white-space: nowrap; flex-shrink: 0;
}
.stock-negotiating { color: var(--warn); font-weight: 700; font-size: 0.88rem; }
tbody tr.negotiating { opacity: 1; }
tbody tr.negotiating:hover { background: var(--bg); }

/* Rank filter checkboxes */
.rank-checks { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
.rank-check-item { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.rank-check-item input { width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; margin: 0; }

/* Stock notice */
.stock-notice {
  padding: 10px 16px; margin-bottom: 12px;
  background: var(--warn-bg); border: 1px solid #fcd34d;
  font-size: 0.8rem; color: var(--warn); line-height: 1.6;
}

/* Yes/No */
.yn-yes { color: var(--yes); font-size: 1rem; }
.yn-no  { color: var(--no);  font-size: 0.9rem; }

.no-results {
  text-align: center; padding: 48px;
  color: var(--muted); font-size: 0.875rem;
}

/* ── Modal overlay ── */
.overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(20,20,19,0.5); z-index: 100;
  align-items: center; justify-content: center; padding: 20px;
}
.overlay.open { display: flex; }

.modal {
  background: #fff; border: 1px solid var(--border);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.modal-header h2 { font-size: 1rem; font-weight: 700; }
.modal-header p  { font-size: 0.8rem; color: var(--muted); margin-top: 3px; font-weight: 300; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.2rem; color: var(--muted); line-height: 1;
  padding: 2px 6px; transition: background 0.15s ease;
}
.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body { padding: 20px 24px; }

/* Selected items preview */
.selected-items {
  background: var(--accent-bg); border: 1px solid var(--border);
  padding: 12px 16px; margin-bottom: 20px;
}
.selected-items h3 {
  font-size: 0.7rem; font-weight: 500; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 8px;
}
.selected-items ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.selected-items li {
  font-size: 0.875rem; color: var(--text);
  display: flex; flex-direction: column; gap: 1px;
}
.selected-items li .spec { font-size: 0.75rem; color: var(--muted); font-weight: 300; }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 0.7rem; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.form-group label .req { color: var(--danger); margin-left: 2px; }
.form-group label .hint {
  font-size: 0.62rem; font-weight: 400; color: var(--muted);
  text-transform: none; letter-spacing: 0; margin-left: 6px;
}
.form-group input,
.form-group textarea {
  padding: 9px 12px; border: 1px solid var(--border);
  font-size: 0.875rem; outline: none; font-family: inherit;
  transition: border-color 0.15s ease; color: var(--text);
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 120px; line-height: 1.85; }

/* Radio rows for membership / license */
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.radio-wrap {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border: 1px solid var(--border);
  cursor: pointer; font-size: 0.84rem; color: var(--text);
  background: #fff; transition: all 0.15s ease; user-select: none;
}
.radio-wrap:hover { border-color: var(--accent); }
.radio-wrap input[type="radio"] { width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.radio-wrap input[type="radio"]:checked + span { color: var(--accent); font-weight: 600; }
.radio-wrap:has(input[type="radio"]:checked) { border-color: var(--accent); background: var(--accent-bg); }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}
.btn-cancel {
  padding: 9px 18px; border: 1px solid var(--border);
  background: #fff; font-size: 0.875rem; font-weight: 500;
  cursor: pointer; color: var(--muted); transition: background 0.15s ease;
}
.btn-cancel:hover { background: var(--bg); }
.btn-submit {
  padding: 9px 22px; border: none;
  background: var(--accent); color: #fff;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s ease;
}
.btn-submit:hover { background: var(--accent-dark); }

/* Success state */
.success-msg {
  display: none; text-align: center; padding: 40px 24px;
}
.success-msg .check-icon {
  width: 48px; height: 48px; margin: 0 auto 16px;
  background: var(--yes-bg); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.success-msg h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.success-msg p { font-size: 0.875rem; color: var(--muted); line-height: 1.85; font-weight: 300; }

/* Error banner */
#load-error {
  background: var(--danger-bg); border: 1px solid #fecaca;
  padding: 14px 18px; color: var(--danger); font-size: 0.875rem;
  margin-bottom: 16px; display: none;
}

/* ── Filter toggle (mobile) ── */
.filter-toggle {
  display: none; width: 100%; padding: 11px 16px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 0.875rem; font-weight: 600; cursor: pointer; color: var(--text);
  align-items: center; justify-content: space-between; margin-bottom: 10px;
  text-align: left; font-family: inherit;
}
.filter-panel.collapsed { display: none !important; }

/* ── Fixed inquiry bar (all screen sizes when selection exists) ── */
.inquire-fixed {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  padding: 12px 16px; background: #fff; border-top: 1px solid var(--border);
  z-index: 50;
  align-items: center; justify-content: space-between; gap: 10px;
}
.inquire-fixed.has-selection { display: flex; }
.inquire-fixed .sel-label { font-size: 0.84rem; color: var(--muted); }
.inquire-fixed .sel-label strong { color: var(--text); }
.inquire-fixed #inquire-btn-mobile {
  padding: 9px 18px; background: var(--accent); color: #fff;
  border: none; font-size: 0.875rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.inquire-fixed #inquire-btn-mobile:hover { background: var(--accent-dark); }

/* Responsive */
@media (max-width: 768px) {
  .filter-toggle { display: flex; }
  .filter-panel  { flex-direction: column; padding: 16px; gap: 12px; }
  .fg { width: 100%; }
  .fg select, .fg input[type="text"] { width: 100%; min-width: unset; box-sizing: border-box; }
  .cb-wrap { padding: 4px 0; }

  main { padding-bottom: 72px; }
  .inquire-fixed { display: flex; }
  #inquire-btn   { display: none !important; }

  .action-bar { flex-direction: column; align-items: flex-start; }
  .form-grid  { grid-template-columns: 1fr; }
  .modal-footer { flex-direction: column-reverse; }
  .btn-cancel, .btn-submit { width: 100%; text-align: center; }
}
@media (max-width: 640px) {
  header { padding: 12px 16px; gap: 12px; }
  .header-logo { height: 36px; }
  .header-text h1 { font-size: 0.9rem; }
  .header-divider { display: none; }
}

/* ── 週次お得品リスト（special.html）だけが使う列 ── */
.price-cell { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.note-cell { min-width: 12em; max-width: 24em; white-space: normal; }
.list-empty { margin: 24px 0; padding: 20px; text-align: center; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; color: #4b5563; }


/* ── /special のタブ（出品中／今週のお得品）──
   .tab / .tab.active は既存のものをそのまま使う。ここは並べ方と中身の出し分けだけ。 */
.tabs { display: flex; gap: 6px; margin: 0 0 14px; flex-wrap: wrap; }
.tabs .tab { border-radius: 4px; padding: 8px 18px; font-size: 0.9rem; }
.tab-panel[hidden] { display: none; }

/* 出品中の表だけが持つ列。画像は高さを固定して行の高さを揃える */
.thumb-cell { width: 68px; }
.thumb-cell img {
  width: 56px; height: 56px; object-fit: contain;
  background: var(--bg); border: 1px solid var(--border); border-radius: 3px; display: block;
}
/* 品名が商品ページへのリンクになる（お得品側は選択用のテキスト） */
td .pname[href] { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
td .pname[href]:hover { color: var(--accent); }


/* ── 見出し行の固定 ──
   ★スクロールすると「○」がカメラなのかテンキーなのか分からなくなる（オーナー指摘 2026-09-23）。
   ★入れ物の作りを変えないと効かない：
     .table-wrap の overflow:hidden と .table-scroll の overflow:auto が
     sticky の基準になってしまい、ページを送っても見出しが付いてこない。
     表そのものに縦のスクロールを持たせて、その中で見出しを止める。
   実機で確認（2026-09-23）：縦に400px送っても見出しが上に残る。 */
.table-wrap { overflow: visible; }
.table-scroll {
  /* --table-max は fitTables() が「画面の高さ − 張り付いた絞り込み欄 − 表より下の余白」で入れる。
     入る前（読み込み直後）は以前と同じ値 */
  max-height: var(--table-max, calc(100vh - 150px));
  overflow-y: auto;
}
thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg);
}
/* 画面が低いときは固定しない（見出しだけで埋まってしまう） */
@media (max-height: 480px) {
  .table-scroll { max-height: none; overflow-y: visible; }
  thead th { position: static; }
}

/* ── 出品中の表を横に広げない ──
   品名はスペックを落として短くしている（js/shiire-tab.js の shortName）。
   長い商品（周辺機器など）で表が伸びないよう上限を置き、はみ出す分は … にする。
   元のタイトルは title 属性にあるので、指を置けば全部読める。 */
#panel-shiire td .pname {
  display: inline-block; max-width: 16em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
#panel-shiire .maker-cell { max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 列が12あるので、左右の余白を詰めて画面に収める（現行ページの表は触らない） */
#panel-shiire thead th, #panel-shiire tbody td { padding-left: 9px; padding-right: 9px; }
#panel-shiire table { min-width: 0; }

/* ── タブごとに出す列（2026-09-23）──
   ★見出し（thead）と中身（td）に同じクラスを付け、**ここ1か所で出し入れする**。
   以前は td を作るかどうかを JS 側で分けていたが、見出しは HTML 側にあるため条件が2か所に散り、
   片方だけ直すと見出しと中身が1列ずれる。 */
#list-table .col-price,
#list-table .col-cpu-model,
#list-table .col-os,
#list-table .col-note { display: none; }
#list-table.show-price .col-price,
#list-table.show-cpu-model .col-cpu-model,
#list-table.show-os .col-os,
#list-table.show-note .col-note { display: table-cell; }

/* ── 会員向けページ（special.html）の扉 ── */
.gate { max-width: 460px; margin: 24px auto 32px; padding: 20px 22px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.gate label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 8px; }
.gate-row { display: flex; gap: 8px; }
.gate-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; }
.gate-row .btn-submit { white-space: nowrap; }
.gate-msg { margin: 10px 0 0; font-size: 0.85rem; color: #b91c1c; min-height: 1.2em; }

/* ── CSV の保存ボタン（special.html）。主操作（問い合わせ）より弱く見せる ── */
.btn-csv { margin-left: auto; padding: 8px 14px; font-size: 0.85rem; background: #fff; color: var(--navy); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.btn-csv:hover { border-color: var(--accent); color: var(--accent); }
.btn-csv:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.action-bar .btn-csv + #inquire-btn { margin-left: 8px; }

/* ── 問い合わせの「希望」（2026-10-16）──
   選んだ商品ごとの希望単価・台数と、リストに無い商品のリクエスト。
   ★既存の部品（.form-group・.radio-wrap・.btn-csv）に寄せる。新しい見た目を発明しない。
   ★数字は右揃え・等幅数字・単位つき。エラーは項目の直下（送信ボタンは無効化しない）。 */

/* 入口①：ページ上部の帯（見出しの右）。紺の帯の上で一番目立つ強調色の塗り（2026-10-19 に件数の横から移した） */
.btn-wanted-header {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  font-size: 0.9rem; font-weight: 700; font-family: inherit; white-space: nowrap; cursor: pointer;
  transition: background 0.15s ease;
}
.btn-wanted-header:hover { background: var(--accent-dark); }
.btn-wanted-header:active { transform: translateY(1px); }
.btn-wanted-header:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* ★display を指定しているので hidden 属性が効かない。明示的に消す（special.html の扉の間） */
.btn-wanted-header[hidden] { display: none; }

/* 入口②の土台（0件のときの「この条件でリクエスト」） */
.btn-wanted {
  padding: 8px 14px; min-height: 40px; font-size: 0.85rem;
  background: #fff; color: var(--navy);
  border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-wanted:hover { border-color: var(--accent); color: var(--accent); }
.btn-wanted:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 0件のとき：案内の下に主ボタンの色で */
.no-results .no-results-cta {
  margin-top: 14px; background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600;
}
.no-results .no-results-cta:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

/* 選んだ商品の行の入力 */
.wish-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 14px; margin: 6px 0 4px;
}
.wish-field {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 0.68rem; font-weight: 500; color: var(--muted); letter-spacing: 0.06em;
}
.wish-listed { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-bottom: 9px; }

/* 数字の入力欄（単位つき） */
.num-wrap { display: inline-flex; align-items: center; gap: 6px; }
.num-wrap input {
  width: 8.5em; padding: 8px 10px; min-height: 40px;
  border: 1px solid var(--border); background: #fff;
  font-size: 0.875rem; font-family: inherit; color: var(--text);
  text-align: right; font-variant-numeric: tabular-nums; outline: none;
  transition: border-color 0.15s ease;
}
.wish-qty { width: 5.5em !important; }
.num-wrap input:focus { border-color: var(--accent); }
.num-wrap .unit { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

/* エラー（項目の直下） */
.field-err { flex-basis: 100%; margin: 0; font-size: 0.75rem; color: var(--danger); min-height: 0; }
.field-err:empty { display: none; }
.has-error { border-color: var(--danger) !important; }

/* リクエスト欄 */
.wanted { margin-bottom: 20px; }
.wanted-toggle {
  width: 100%; min-height: 44px; padding: 10px 14px; text-align: left;
  background: #fff; color: var(--navy); font-size: 0.875rem; font-weight: 600;
  border: 1px dashed var(--border); cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease;
}
.wanted-toggle:hover { border-color: var(--accent); color: var(--accent); }
.wanted-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wanted-body { border: 1px solid var(--border); border-top: none; padding: 14px 16px 16px; background: var(--bg); }
.wanted-toggle[hidden] + .wanted-body { border-top: 1px solid var(--border); }
.wanted-title {
  font-size: 0.7rem; font-weight: 500; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 10px;
}
.wanted-body .form-group textarea { min-height: 72px; }

@media (max-width: 640px) {
  /* スマホ：帯の中で1行使う全幅のボタン */
  header { flex-wrap: wrap; }
  .btn-wanted-header { margin-left: 0; width: 100%; justify-content: center; }
}
@media (max-width: 768px) {
  .num-wrap input { width: 9em; min-height: 44px; }
  .btn-wanted { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-wanted, .btn-wanted-header, .wanted-toggle, .num-wrap input { transition: none; }
}


/* ── 一覧の上の「希望単価」の列と、商品の詳細（2026-10-20）──
   入力できる列だとひと目で分かるように、列全体を淡い強調色にする（オーナー要望）。
   見出しの NEW マークは 2026-10-20 にオーナー判断で外した（不要） */
th.col-wish { background: #ffe2d1; white-space: nowrap; }
td.col-wish { background: var(--accent-bg); }
tbody tr.selected td.col-wish { background: #ffdcc8; }
.th-sub { display: block; font-size: 0.6rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.list-wish { display: inline-flex; align-items: center; gap: 4px; }
.row-wish {
  width: 6.5em; padding: 6px 8px; min-height: 34px;
  border: 1px solid #f4b99a; background: #fff; border-radius: 3px;
  font-size: 0.85rem; font-family: inherit; color: var(--text);
  text-align: right; font-variant-numeric: tabular-nums; outline: none;
  transition: border-color 0.15s ease;
}
.row-wish:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(242,101,34,0.15); }
.row-wish:disabled { background: transparent; border-color: var(--border); cursor: not-allowed; }
.list-wish .unit { font-size: 0.75rem; color: var(--muted); }

/* 商品の詳細 */
.detail-modal { max-width: 520px; }
.detail-specs {
  display: grid; grid-template-columns: 7.5em 1fr; gap: 6px 14px;
  font-size: 0.875rem; margin-bottom: 18px;
}
.detail-specs dt { color: var(--muted); font-size: 0.8rem; }
.detail-specs dd { margin: 0; font-weight: 500; }
.detail-wish { padding: 14px 16px; background: var(--accent-bg); border: 1px solid var(--border); }
.detail-oos { margin-top: 10px; font-size: 0.8rem; color: var(--muted); }
.btn-submit:disabled { opacity: 0.45; cursor: not-allowed; }

@media (max-width: 768px) {
  .row-wish { min-height: 40px; width: 6em; }
}
@media (prefers-reduced-motion: reduce) {
  .row-wish { transition: none; }
}
