/* 新作EA一覧（比較表）。2026-10-15 [CC] TASK_sales_audit_1014 C-2 でトップ（index.html）から products.html へ移した。
 * 中身は index.html の <style> にあった規則をそのまま写したもの（index 側の規則は残してある。消していない）。 */
/* ===================================================
   NEW RELEASES TABLE & MOBILE CARDS COMPONENT
   =================================================== */

/* Common Elements */
.ea-market-pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ea-market-pill.m-gold {
  background: rgba(212, 169, 74, 0.12);
  border: 1px solid rgba(212, 169, 74, 0.3);
  color: #b08d3c;
}
.ea-market-pill.m-oil {
  background: rgba(100, 116, 139, 0.12);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: #475569;
}
.ea-market-pill.m-jpy {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #2563eb;
}

.ea-pill-rec {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #d4a94a, #b08d3c);
  color: #fff;
  letter-spacing: 0.03em;
  box-shadow: 0 1px 4px rgba(176, 141, 60, 0.25);
}

.ea-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #16a34a;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.ea-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.7);
  display: inline-block;
}
.ea-pending-tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--raised);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.ea-bt-pf {
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  margin-right: 2px;
}
.ea-bt-deals {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===================================================
   NEW RELEASES TABLE（DOM は1つ。スマホでは CSS でカード状に組み替える）
   + メンバーシップ / 期間限定バナー
   =================================================== */

/* 数値セル */
.ea-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
  white-space: nowrap;
}
.ea-num-period { font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.ea-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: normal;
}
.ea-type-note {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}

.ea-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-x: auto;
}
.ea-modern-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.ea-modern-table thead {
  background: var(--raised);
  border-bottom: 1px solid var(--border);
}
.ea-modern-table th {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 12px 10px;
  white-space: nowrap;
}
.ea-modern-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}
.ea-modern-table tbody tr:last-child { border-bottom: none; }
.ea-modern-table tbody tr:hover { background: var(--raised); }
.ea-modern-table tbody tr.ea-row-featured { background: rgba(176, 141, 60, 0.05); }
.ea-modern-table tbody tr.ea-row-featured:hover { background: rgba(176, 141, 60, 0.1); }
.ea-modern-table tbody tr.ea-row-featured td:first-child { border-left: 3px solid var(--brass, #b08d3c); }
.ea-modern-table td {
  padding: 12px 10px;
  vertical-align: top;
  color: var(--text);
}
.ea-name-flex {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.ea-name-txt {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.ea-col-type {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  min-width: 150px;
  max-width: 210px;
}
.ea-col-price {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}
.ea-col-action { text-align: center; width: 170px; max-width: 170px; }
/* site.js が行に足す「無料体験」「メンバーシップで使う」リンク。PC では表を伸ばさないよう折り返して小さく置く */
@media (min-width: 1025px) {
  .ea-modern-table .ea-col-action .sl-route-links { display: flex; flex-direction: column; align-items: center; gap: 0; margin-top: 6px; }
  .ea-modern-table .ea-col-action .sl-route-link { min-height: 0; padding: 2px 0; font-size: 12px; line-height: 1.4; white-space: normal; text-align: center; }
  .ea-modern-table .ea-live-tag { font-size: 12px; padding: 3px 7px; white-space: normal; }
  /* 2026-10-14 詳細列の崩れ: 自動レイアウトで詳細列が 60px 前後まで押しつぶされ、「条件と弱点 →」と site.js の
     「7日間・リアル口座で無料」「メンバーシップで使う（PRO・月額…）→」が1〜2文字ずつ縦に折り返していた。
     詳細列に最小幅を持たせ、ボタンは折り返さない。代わりにフォワード・運用タイプの列を細くして表の総幅を抑える。 */
  /* 製品名は語の切れ目で折り返してよい（推しEA の札は次の行へ）。セルの左右の余白も 8px → 6px。
     1280・1440・1550px で表が枠（約1078px）に収まることをブラウザで確認（2026-10-14）。 */
  .ea-modern-table .ea-col-action { min-width: 140px; }
  .ea-modern-table .ea-btn-detail { white-space: nowrap; }
  .ea-modern-table .ea-col-fw { min-width: 0; }
  .ea-modern-table .ea-live-tag { display: inline-block; }
  .ea-modern-table .ea-col-name { min-width: 112px; }
  .ea-modern-table .ea-name-flex { flex-wrap: wrap; white-space: normal; gap: 2px 8px; }
  .ea-modern-table th, .ea-modern-table td { padding-left: 6px; padding-right: 6px; }
  .ea-col-type { min-width: 120px; max-width: 150px; }
}
.ea-btn-detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--raised);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.ea-btn-detail:hover {
  background: var(--text);
  color: var(--canvas) !important;
  border-color: var(--text);
}
.ea-btn-detail .arr { transition: transform 0.15s ease; }
.ea-btn-detail:hover .arr { transform: translateX(2px); }

.ea-table-notes { margin-top: 16px; max-width: 900px; }
.ea-table-notes p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}
.ea-table-notes strong { color: var(--text); font-weight: 600; }

/* バッジ色のコントラスト補正（light は濃く、dark は明るく。AA 4.5:1 以上） */
.ea-market-pill.m-gold { color: #7a5c14; }
.ea-market-pill.m-oil { color: #334155; }
.ea-market-pill.m-jpy { color: #1d4ed8; }
.ea-live-tag { color: #15803d; }
:root[data-theme="dark"] .ea-market-pill.m-gold { color: #e2c26a; }
:root[data-theme="dark"] .ea-market-pill.m-oil { color: #cbd5e1; }
:root[data-theme="dark"] .ea-market-pill.m-jpy { color: #93c5fd; }
:root[data-theme="dark"] .ea-live-tag { color: #4ade80; }
.ea-col-fw { min-width: 150px; }

/* タブレット・スマホ: 同じ表を CSS でカード状に組み替える（表が収まらない幅から） */
@media (max-width: 1024px) {
  .ea-table-wrap { background: transparent; border: none; border-radius: 0; overflow: visible; }
  .ea-modern-table, .ea-modern-table tbody { display: block; }
  .ea-modern-table thead {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .ea-modern-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "name name"
      "market price"
      "type type"
      "pf trades"
      "dd period"
      "fw fw"
      "act act";
    gap: 10px 14px;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
  }
  .ea-modern-table tbody tr:last-child { border-bottom: 1px solid var(--border); }
  .ea-modern-table tbody tr.ea-row-featured {
    border: 1.5px solid var(--brass, #b08d3c);
    background: linear-gradient(180deg, rgba(176, 141, 60, 0.08) 0%, var(--card) 100%);
  }
  .ea-modern-table tbody tr.ea-row-featured td:first-child { border-left: 0; }
  .ea-modern-table td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; }
  .ea-modern-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-muted);
  }
  .ea-modern-table .ea-col-name { grid-area: name; }
  .ea-modern-table .ea-col-market { grid-area: market; }
  .ea-modern-table .ea-col-market::before { display: none !important; }
  .ea-modern-table .ea-col-type { grid-area: type; max-width: none; min-width: 0; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
  .ea-modern-table .ea-col-pf { grid-area: pf; }
  .ea-modern-table .ea-col-trades { grid-area: trades; }
  .ea-modern-table .ea-col-dd { grid-area: dd; }
  .ea-modern-table .ea-col-period { grid-area: period; }
  .ea-modern-table .ea-col-fw { grid-area: fw; }
  .ea-modern-table .ea-col-price { grid-area: price; text-align: right; }
  .ea-modern-table .ea-col-price::before { display: none !important; }
  .ea-modern-table .ea-col-action { grid-area: act; text-align: left; width: auto; max-width: none; }
  .ea-name-flex { flex-wrap: wrap; white-space: normal; }
  .ea-name-txt { font-size: 15px; font-weight: 800; }
  .ea-btn-detail {
    display: flex; justify-content: center; width: 100%; min-height: 44px;
    padding: 10px 16px; border-radius: 8px; font-size: 13px;
  }
}
