/* =========================================================================
   LIMITLESS THEME（2026-10-07 丸「デザインも根本的に改造・カラーも踏襲」）
   手本＝https://limitlesstcg.com/ の実測値（2026-10-07 計算済みスタイルを読取）：
     地 #ffffff / 文字 #222222 / ヘッダー #080808・文字 #f0f0f0・上帯の線 #4d4d4d
     パネル #f5f5f5 角丸8px / 縞の行 #f9f9f9 / 表の見出し下線 2px #222 / 行の高さ40px
     見出し 22px 600・前に「ll」#c5c5c5 / ボタン #a41c32 角丸5px / リンク青 #0275d8
     書体 Open Sans（ナビは Open Sans Condensed 700）
   全ページの </head> 直前に scripts/postbuild-limitless.js が差し込む（インラインCSSより後＝後勝ち）。
   旧 NEO ARCADE のトークン名（shared.css）と legacy-theme のトークン名を両方とも上書きするので、
   ページ本体は無改造。注入をやめれば即座に旧デザインへ戻る。
   ⚠ TH版のためにタイ文字の書体（Noto Sans Thai）を必ず後ろに並べる（Open Sansはタイ文字を持たない）
   ========================================================================= */

:root {
  --lx-header: #080808;
  --lx-header-text: #f0f0f0;
  --lx-header-line: #4d4d4d;
  --lx-input: #1c1c1e;
  --lx-input-line: #48484a;
  --lx-panel: #f5f5f5;
  --lx-stripe: #f9f9f9;
  --lx-line: #e6e6e6;
  --lx-marker: #c5c5c5;
  --lx-red: #a41c32;
  --lx-blue: #0275d8;
  --lx-font: 'Open Sans', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --lx-font-nav: 'Open Sans Condensed', 'Open Sans', 'Noto Sans Thai', sans-serif;

  /* shared.css のトークン */
  --c-bg: #ffffff;
  --c-bg-2: #f9f9f9;
  --c-surface: #f5f5f5;
  --c-surface-2: #ececec;
  --c-line: #e6e6e6;
  --c-line-2: #d3d3d3;
  --c-line-hot: #a41c32;
  --c-text: #222222;
  --c-muted: #666666;
  --c-faint: #999999;
  --c-accent: #a41c32;
  --c-accent-dim: #7f1527;
  --c-accent-ink: #ffffff;
  --c-light: #b58900;   /* 光文明の黄は白地で読めないので濃くする */
  --c-gold: #b58900;
  --c-border: #e6e6e6;
  --c-border-soft: #e6e6e6;
  --f-display: var(--lx-font);
  --f-body: var(--lx-font);
  --r-sm: 3px;
  --r: 5px;
  --r-lg: 8px;

  /* legacy-theme.css のトークン（デッキ解説・カード一覧） */
  --panel: #f5f5f5;
  --text: #222222;
  --muted: #666666;
  --accent: #a41c32;
  --line: #e6e6e6;
  --dma-bg: #ffffff;
  --dma-bg-2: #f9f9f9;
  --dma-surface-2: #ececec;
  --dma-line-2: #d3d3d3;
  --dma-accent-ink: #ffffff;
  --dma-faint: #999999;
}

html { background: #ffffff; }
body {
  background: #ffffff !important;
  color: #222222 !important;
  font-family: var(--lx-font) !important;
  letter-spacing: normal;
}
h1, h2, h3, h4, .section-label, .prod-code, .bn-label { font-family: var(--lx-font); letter-spacing: normal; }
::selection { background: #a41c32; color: #fff; }
:focus-visible { outline: 2px solid var(--lx-blue); outline-offset: 2px; }

/* ---- 共通ヘッダー（全ページ） ---- */
.lx-header { background: var(--lx-header); color: var(--lx-header-text); position: relative; z-index: 50;
  width: 100%; max-width: 100vw; min-width: 0; box-sizing: border-box; justify-self: stretch; align-self: stretch; }
.lx-top-in > *, .lx-main-in > * { min-width: 0; }
.lx-header a { color: var(--lx-header-text); text-decoration: none; }
.lx-top { border-bottom: 2px solid var(--lx-header-line); font-size: 13px; }
.lx-top-in, .lx-main-in { max-width: 1200px; margin: 0 auto; padding: 0 12px; box-sizing: border-box; }
.lx-top-in { display: flex; gap: 6px; align-items: center; min-height: 30px; white-space: nowrap; overflow: hidden; }
.lx-top b { font-weight: 600; flex: none; }
.lx-top-links { display: flex; gap: 14px; min-width: 0; overflow: hidden; }
.lx-top-links a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 599px) { .lx-top-links a.more { display: none; } }
.lx-top a:hover { text-decoration: underline; }
.lx-main-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 8px; padding-bottom: 8px; position: relative; }
.lx-logo { display: flex; align-items: center; gap: 8px; font: 700 18px var(--lx-font-nav); text-transform: uppercase; letter-spacing: .02em; }
.lx-logo img { height: 40px; width: auto; display: block; }
.lx-search { flex: 1 1 260px; min-width: 0; }
.lx-search-in { position: relative; display: flex; }
.lx-search input {
  width: 100%; box-sizing: border-box; min-height: 44px; padding: 5px 10px 5px 38px;
  font: 16px var(--lx-font); color: var(--lx-header-text);
  background: var(--lx-header); border: 2px solid var(--lx-input-line); border-radius: 5px;
}
.lx-search input::placeholder { color: #8e8e93; }
.lx-search input:focus { outline: none; border-color: #f0f0f0; }
.lx-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: #8e8e93; fill: none; stroke-width: 2; }
.lx-nav { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -6px; }
.lx-nav::-webkit-scrollbar { display: none; }
.lx-nav a { font: 700 20px var(--lx-font-nav); padding: 10px 14px; white-space: nowrap; }
.lx-nav a:hover, .lx-nav a.on { color: #ffffff; box-shadow: inset 0 -3px 0 var(--lx-red); }
.lx-results {
  position: absolute; left: 12px; right: 12px; top: calc(100% - 2px); z-index: 60;
  background: #fff; color: #222; border: 1px solid #d3d3d3; border-radius: 5px; box-shadow: 0 6px 20px rgba(0,0,0,.18);
  max-height: 70vh; overflow: auto; display: none;
}
.lx-results.open { display: block; }
.lx-results a { display: grid; grid-template-columns: 86px 1fr; gap: 0 10px; padding: 9px 12px; min-height: 44px; box-sizing: border-box; border-bottom: 1px solid var(--lx-line); color: #222; text-decoration: none; }
.lx-results a:nth-child(odd) { background: var(--lx-stripe); }
.lx-results a:hover, .lx-results a:focus { background: #ececec; }
.lx-results .k { grid-row: span 2; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--lx-red); padding-top: 2px; }
.lx-results .s { font-size: 13px; color: #666; }
.lx-results .none { padding: 14px; color: #666; }
@media (max-width: 899px) {
  .lx-logo img { height: 34px; }
  .lx-nav { order: 3; width: calc(100% + 12px); }
  .lx-nav a { font-size: 17px; padding: 8px 12px; }
}
@media (min-width: 900px) {
  .lx-search { order: 2; max-width: 420px; }
  .lx-nav { order: 3; margin-left: auto; }
}

/* ---- 旧ナビ：PCではヘッダーに統合したので出さない。携帯の下部バーは白にする ---- */
.bottom-nav { background: #ffffff !important; border-top: 1px solid #d3d3d3 !important; box-shadow: 0 -2px 8px rgba(0,0,0,.06); }
.bottom-nav .bn-item { color: #666 !important; }
.bottom-nav .bn-item.active { color: #222 !important; }
.bottom-nav .bn-item.active::before, .bottom-nav .bn-item.active::after { background: var(--lx-red) !important; }
@media (min-width: 900px) {
  .bottom-nav { display: none !important; }
  body { padding-top: 0 !important; }
  .lang-bar { top: 0 !important; }
}

/* ---- 旧ページの見出し帯・ヒーロー：黒い帯をやめて白地の見出しにする ---- */
.top-header, .page-header, .header, .hero { background: #ffffff !important; color: #222 !important; border-color: var(--lx-line) !important; }
.top-header::before, .header::before, .hero::before { display: none !important; }
.breadcrumb a, .breadcrumb { color: #666 !important; }
.lang-bar { background: rgba(255,255,255,.95) !important; border-bottom: 1px solid var(--lx-line) !important; }
.lang-btn { color: #222 !important; border-color: #d3d3d3 !important; }
.lang-btn.active { background: var(--lx-red) !important; color: #fff !important; border-color: var(--lx-red) !important; }

/* ---- 光文明の札：黄色の文字は白地で読めないので濃い黄土色にする ---- */
.civ-Light, .civ-light { color: #8a6500 !important; border-color: #d9b44a !important; background: #fff7d6 !important; }

/* ---- リンク：本文中は青（Limitless） ---- */
main a:not([class]), .wrap a:not([class]), article a:not([class]), .card-text a, p a { color: var(--lx-blue); }

/* ---- 大会ページ（英語自動掲載が生成・インラインで暗色を持つ） ---- */
.lx-tour main a { color: var(--lx-blue); }
.lx-tour main > a:first-child { color: #666; }
.lx-tour article { border: 0 !important; background: var(--lx-panel); border-radius: 8px; }
.lx-tour .muted, .lx-tour dt { color: #666 !important; }
.lx-tour th, .lx-tour td { border-bottom-color: var(--lx-line) !important; }

/* ===================== 新トップ・一覧（lx-*） ===================== */
.lx-page { max-width: 1200px; margin: 0 auto; padding: 16px 12px 100px; box-sizing: border-box; }
.lx-page h1 { font-size: 28px; font-weight: 700; margin: 8px 0 4px; }
.lx-lead { color: #666; margin: 0 0 18px; }
.lx-grid { display: grid; gap: 28px; grid-template-columns: 1fr;
  grid-template-areas: "updates" "tournaments" "decks" "products" "rules"; }
.lx-updates { grid-area: updates; } .lx-tour-sec { grid-area: tournaments; } .lx-decks { grid-area: decks; }
.lx-products { grid-area: products; } .lx-rules { grid-area: rules; }
@media (min-width: 900px) {
  .lx-grid { grid-template-columns: 2fr 1fr; grid-template-areas: "tournaments updates" "decks products" "decks rules"; align-items: start; }
}
.lx-h2 { display: flex; align-items: baseline; gap: 8px; font-size: 22px; font-weight: 600; margin: 0 0 10px; color: #222; }
.lx-h2::before { content: "ll"; color: var(--lx-marker); font-weight: 700; letter-spacing: -.08em; }
.lx-h2 .more { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--lx-blue); text-decoration: none; }
.lx-h2 .more:hover { text-decoration: underline; }

table.lx-table { width: 100%; border-collapse: collapse; font-size: 15px; }
table.lx-table th { text-align: left; font-weight: 600; padding: 8px 6px 8px 10px; border-bottom: 2px solid #222; white-space: nowrap; }
table.lx-table td { padding: 8px 6px 8px 10px; height: 40px; box-sizing: border-box; vertical-align: middle; }
table.lx-table tbody tr:nth-child(odd) { background: var(--lx-stripe); }
table.lx-table tbody tr:hover { background: #ececec; }
table.lx-table a { color: #222; text-decoration: none; }
table.lx-table a:hover { color: var(--lx-blue); text-decoration: underline; }
table.lx-table .num { text-align: right; font-variant-numeric: tabular-nums; }
table.lx-table .date { white-space: nowrap; color: #444; }
table.lx-table .sub { color: #666; font-size: 13px; }
/* 表の行全体を押せるようにする（名前のリンクを行いっぱいに広げる） */
table.lx-table tbody tr { position: relative; }
table.lx-table td.name a::after { content: ""; position: absolute; inset: 0; }
table.lx-table td.win { color: #444; }

.lx-list { list-style: none; margin: 0; padding: 0; background: var(--lx-panel); border-radius: 8px; overflow: hidden; }
.lx-list li + li { border-top: 1px solid #e6e6e6; }
.lx-page .lx-list a { color: #222; }
.lx-list a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; min-height: 44px; box-sizing: border-box; color: #222; text-decoration: none; }
.lx-list a:hover { background: #ececec; }
.lx-list img { width: 40px; height: auto; border-radius: 3px; flex: none; }
.lx-list .t { display: block; font-weight: 600; line-height: 1.35; }
.lx-list .s { display: block; font-size: 13px; color: #666; line-height: 1.4; }
.lx-list .d { flex: none; min-width: 48px; font-size: 13px; color: #666; font-variant-numeric: tabular-nums; }
.lx-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #fff; background: var(--lx-red); border-radius: 3px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px; }
.lx-tag.alt { background: #4d4d4d; }
.lx-btn { display: inline-flex; align-items: center; min-height: 48px; box-sizing: border-box; background: var(--lx-red); color: #fff !important; font-weight: 700; font-size: 16px; padding: 10px 18px; border-radius: 5px; text-decoration: none; }

.lx-btn.alt { background: #4d4d4d; }

/* ---- カード一覧：2026年より前の弾（/archive/・scripts/gen_archive.py） ---- */
.lx-h3 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; color: #222; }
.lx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lx-chips a { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; box-sizing: border-box; padding: 0 14px;
  background: var(--lx-panel); border: 1px solid #e0e0e0; border-radius: 5px; color: #222; text-decoration: none; font-weight: 600; font-size: 15px; }
.lx-chips a:hover { background: #ececec; }
.lx-chips a span { font-weight: 400; font-size: 14px; color: #666; }
.lx-crumb { margin: 0 0 6px; font-size: 14px; color: #666; }
.lx-crumb a { color: var(--lx-blue); text-decoration: none; display: inline-flex; align-items: center; min-height: 48px; }
.ac-table .ac-img { width: 56px; padding-right: 0; }
.ac-table .ac-img img { display: block; width: 48px; height: auto; border-radius: 3px; }
.ac-table .ac-jp, .ac-table .ac-race { display: block; font-size: 14px; color: #666; }
.ac-table td.name a { font-weight: 600; }
.ac-table .ac-no { white-space: nowrap; color: #666; font-size: 14px; }
.ac-table tbody tr:target { background: #fff4cc !important; }
@media (max-width: 899px) {
  table.ac-table tbody tr { grid-template-columns: 56px 1fr auto; grid-template-areas: "img name name" "img meta pow" "img type type"; align-items: start; }
  table.ac-table td.ac-img { grid-area: img; }
  table.ac-table td.name { grid-area: name; }
  table.ac-table td.ac-civ { grid-area: meta; font-size: 14px; color: #444; }
  table.ac-table td.num:not(.ac-pow) { display: none; }
  table.ac-table td.ac-pow { grid-area: pow; font-size: 14px; color: #444; }
  table.ac-table td.ac-pow:not(:empty)::after { content: " power"; color: #666; }
  table.ac-table td.ac-type { grid-area: type; font-size: 14px; }
  table.ac-table td.ac-no { display: none; }
}
/* 初心者の「次に押す所」：トップの最上段に置く */
.lx-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 24px; }
.lx-cta .lx-btn { min-height: 52px; font-size: 17px; }
@media (max-width: 599px) { .lx-cta .lx-btn { flex: 1 1 100%; justify-content: center; } }

/* =========================================================================
   携帯基準（丸 2026-10-07 の評価への対応）：
   本文 16〜18px／補足 14px以上／押す所は高さ48px以上／横並びは縦積み
   ⚠ ここの数値を下げない。検査＝ブラウザの幅375pxで「14px未満の文字」「48px未満の押す所」を数える
   ========================================================================= */
@media (max-width: 899px) {
  body { font-size: 17px !important; line-height: 1.6; }

  /* 共通ヘッダー */
  .lx-top { font-size: 14px; }
  .lx-top-in { min-height: 44px; }
  .lx-top-links a { display: block; line-height: 48px; }
  .lx-logo { min-height: 48px; padding-right: 6px; }
  .lx-search input { min-height: 48px; font-size: 17px; }
  .lx-nav a { font-size: 18px; padding: 13px 14px; min-height: 48px; box-sizing: border-box; display: inline-flex; align-items: center; }
  .lx-results a { min-height: 56px; font-size: 17px; }
  .lx-results .k, .lx-results .s { font-size: 14px; }

  /* 下部ナビ */
  .bottom-nav { height: 64px !important; }
  .bottom-nav .bn-item { min-height: 64px; }
  .bottom-nav .bn-label { font-size: 14px !important; letter-spacing: .02em !important; }

  /* 新トップ・一覧 */
  .lx-page h1 { font-size: 26px; }
  .lx-h2 { font-size: 22px; }
  .lx-h2 .more { font-size: 16px; display: inline-flex; align-items: center; min-height: 48px; padding: 0 4px; }
  .lx-list a { min-height: 64px; padding: 12px 14px; }
  .lx-list .t { font-size: 17px; }
  .lx-list .s, .lx-list .d { font-size: 14px; }
  .lx-list img { width: 48px; }
  .lx-tag { font-size: 13px; padding: 2px 7px; }
  .lx-lead { font-size: 16px; }

  /* 表は「行ごとの縦積み」にする */
  table.lx-table, table.lx-table tbody { display: block; }
  table.lx-table thead { display: none; }
  table.lx-table tbody tr { display: grid; gap: 2px 12px; padding: 12px 14px; min-height: 64px; box-sizing: border-box; border-bottom: 1px solid var(--lx-line); }
  table.lx-table td { display: block; padding: 0; height: auto; }
  table.lx-table td.name a { font-size: 17px; font-weight: 600; color: #222; }
  /* 大会：日付・定員を1行目、大会名、優勝デッキ */
  table.lx-tt tbody tr { grid-template-columns: auto 1fr; grid-template-areas: "date cap" "name name" "win win"; }
  table.lx-tt td.date { grid-area: date; font-size: 14px; color: #666; }
  table.lx-tt td.cap { grid-area: cap; font-size: 14px; color: #666; text-align: left; }
  table.lx-tt td.cap::before { content: "· "; }
  table.lx-tt td.cap::after { content: " players"; }
  table.lx-tt td.fmt { display: none; }
  table.lx-tt td.name { grid-area: name; }
  table.lx-tt td.win { grid-area: win; font-size: 15px; }
  table.lx-tt td.win::before { content: "Winner: "; color: #666; }
  /* デッキ：順位・デッキ名・勝数 */
  table.lx-dt tbody tr { grid-template-columns: 32px 1fr auto; grid-template-areas: "rank name wins" "rank sub wins"; align-items: center; }
  table.lx-dt td.rank { grid-area: rank; font-size: 16px; color: #666; text-align: left; }
  table.lx-dt td.name { grid-area: name; }
  table.lx-dt td.wins { grid-area: wins; font-size: 18px; font-weight: 700; }
  table.lx-dt td.wins::after { content: " wins"; font-size: 14px; font-weight: 400; color: #666; }
  table.lx-dt td.top { grid-area: sub; font-size: 14px; color: #666; text-align: left; }
  table.lx-dt td.top::after { content: " top finishes"; }
  table.lx-dt td.last { display: none; }

  /* 旧ページの小さい文字の底上げ（補足14px以上） */
  .badge, .civ-badge, .deck-badge, .card-number, .card-meta, .section-label, .sec-label,
  .index-section-label, .quiz-progress, .lang-btn, .breadcrumb, .breadcrumb a, .tagline, .site-sub,
  .prod-meta, .prod-code, .skill-desc, .entry-t2 { font-size: 14px !important; }
  .card-text, .card-content p, .prod-name, .entry-t1 { font-size: 16px !important; line-height: 1.6 !important; }
  .card-name { font-size: 18px !important; }
  .index-link { font-size: 15px !important; display: inline-flex !important; align-items: center; min-height: 48px; box-sizing: border-box; padding: 0 12px !important; }
  .lang-btn { min-height: 48px; min-width: 56px; display: inline-flex !important; align-items: center; justify-content: center; box-sizing: border-box; }
  .btn-primary, .btn-secondary, .exit-btn { min-height: 52px; font-size: 17px !important; display: flex !important; align-items: center; justify-content: center; box-sizing: border-box; }

  .subtitle, .pack-info p, .index-title, .section-header span, .back-to-top, .card-content p,
  .nav-breadcrumb, .nav-breadcrumb a, .nav-breadcrumb span, nav.toc h2, .comp-box h3,
  [style*="font-size:11px"], [style*="font-size:12px"], [style*="font-size:13px"],
  [style*="font-size: 11px"], [style*="font-size: 12px"], [style*="font-size: 13px"] { font-size: 14px !important; }
  .breadcrumb a, .nav-breadcrumb a { display: inline-flex; align-items: center; min-height: 48px; }
  nav.toc a { display: flex; align-items: center; min-height: 48px; box-sizing: border-box; }
  .back-to-top { min-height: 48px; display: inline-flex !important; align-items: center; }
  .lx-top-in { min-height: 48px; }
  .lx-tag { font-size: 14px; }
  .index-group-label, .home-link, .status, .shop-area, .shop-addr, .shop-map, .foot-note, .kw { font-size: 14px !important; }
  .lx-sec-for-tcg-players :is(p, li, td, th) { font-size: 16px !important; }
  .lx-sec-shops :is(p, li) { font-size: 16px !important; }
  .home-link, .shop-map, .lx-sec-shops p a, .back-to-top { display: inline-flex !important; align-items: center; min-height: 48px; box-sizing: border-box; }
  .lang-bar a, .lang-bar span { font-size: 14px !important; }
  .review-link, .review-num, footer p, .wrap > a > span, .keyword-badge,
  [class*="lx-sec-dm26"] p { font-size: max(14px, 1em) !important; }
  .review-link, .review-name, .back-btn, a[href="#top"], [class*="lx-sec-dm26"] div > div > a:not([class]) {
    display: inline-flex !important; align-items: center; min-height: 48px; box-sizing: border-box; }

  /* カード一覧の目次（156件×48px＝7,500px）は携帯では出さない＝上部の検索で引く。PCでは出す */
  .index-box { display: none !important; }

  /* カード一覧：画像と文を縦積みにする */
  .card-inner { flex-direction: column !important; align-items: stretch !important; }
  .card-img-wrap { width: 100% !important; max-width: 260px; margin: 0 auto 10px; }
  .card-img-wrap .card-img, .card-img-wrap img { width: 100% !important; height: auto !important; }

  /* 大会ページ（英語自動掲載の生成物） */
  .lx-tour main > a { display: inline-flex; align-items: center; min-height: 48px; font-size: 16px; }
  .lx-tour article > a:not(:has(img)) { display: flex; align-items: center; min-height: 48px; font-size: 17px; font-weight: 600; }
  .lx-tour article p { font-size: 14px; }
  .lx-tour p a { display: inline-flex; align-items: center; min-height: 48px; }
}
