@charset "UTF-8";
/* ==========================================================================
   ミニPC界隈 — メーカー一覧 / モデル一覧テーブル
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ロゴ（画像が無いときは文字ロゴにフォールバック）
   -------------------------------------------------------------------------- */
/*
  ロゴの縦横比はメーカーごとにばらばら（GMKtec は約5:1 の横長、正方形に近いものもある）。
  枠に対して contain で収め、はみ出させない。
*/
.mpk-maker-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mpk-maker-logo--text {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--mpk-text);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   2. メーカー一覧ページのカードグリッド
   -------------------------------------------------------------------------- */
.entry-content .mpk-maker-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--mpk-space-md);
  margin: var(--mpk-space-xl) 0 0;
  padding: 0;
  list-style: none;
}

@media screen and (min-width: 640px) {
  .entry-content .mpk-maker-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.entry-content .mpk-maker-grid__item {
  margin: 0;
}

.mpk-maker-card {
  display: flex;
  align-items: flex-start;
  gap: var(--mpk-space-md);
  height: 100%;
  padding: var(--mpk-space-lg);
  color: inherit;
  text-decoration: none;
  background-color: var(--mpk-surface);
  border: 1px solid var(--mpk-border);
  border-radius: var(--mpk-radius-md);
  box-sizing: border-box;
  transition: border-color var(--mpk-transition), box-shadow var(--mpk-transition), transform var(--mpk-transition);
}

a.mpk-maker-card:hover {
  text-decoration: none;
  border-color: transparent;
  box-shadow: var(--mpk-shadow-md);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  a.mpk-maker-card:hover {
    transform: none;
  }
}

.mpk-maker-card__logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 104px;
  height: 40px;
}

.mpk-maker-card__logo .mpk-maker-logo {
  max-height: 34px;
}

.mpk-maker-card__logo .mpk-maker-logo--text {
  font-size: var(--mpk-fs-xs);
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  color: var(--mpk-primary);
}

.mpk-maker-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.mpk-maker-card__name {
  display: block;
  font-size: var(--mpk-fs-h-sm);
  font-weight: 800;
  line-height: var(--mpk-lh-tight);
  color: var(--mpk-text);
  transition: color var(--mpk-transition);
}

a.mpk-maker-card:hover .mpk-maker-card__name {
  color: var(--mpk-primary);
}

.mpk-maker-card__series {
  display: block;
  margin-top: 2px;
  font-size: var(--mpk-fs-xs);
  font-weight: 600;
  color: var(--mpk-text-muted);
}

.mpk-maker-card__lead {
  display: block;
  margin-top: var(--mpk-space-xs);
  font-size: var(--mpk-fs-sm);
  line-height: 1.75;
  color: var(--mpk-text-muted);
}

.mpk-maker-card__region {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 2px 10px;
  font-size: var(--mpk-fs-2xs);
  font-weight: 700;
  color: var(--mpk-primary-dark);
  background-color: var(--mpk-primary-soft);
  border-radius: var(--mpk-radius-pill);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   3. サイドバーのメーカー一覧
   -------------------------------------------------------------------------- */
.sidebar .mpk-maker-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar .mpk-maker-list__item {
  border-bottom: 1px solid var(--mpk-border);
}

.sidebar .mpk-maker-list__item:last-child {
  border-bottom: 0;
}

.sidebar .mpk-maker-list__link {
  display: flex;
  align-items: center;
  gap: var(--mpk-space-sm);
  padding: 10px 0;
  font-size: var(--mpk-fs-sm);
  color: var(--mpk-text);
  text-decoration: none;
  transition: color var(--mpk-transition);
}

.sidebar a.mpk-maker-list__link:hover {
  color: var(--mpk-primary);
}

.mpk-maker-list__logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 76px;
  height: 26px;
}

.mpk-maker-list__logo .mpk-maker-logo {
  max-height: 24px;
}

.mpk-maker-list__logo .mpk-maker-logo--text {
  font-size: var(--mpk-fs-2xs);
  color: var(--mpk-primary);
  white-space: normal;
  text-align: left;
  line-height: 1.2;
  word-break: break-word;
}

.mpk-maker-list__name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}

.mpk-maker-list__more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 40px;
  margin-top: var(--mpk-space-xs);
  font-size: var(--mpk-fs-xs);
  font-weight: 700;
  color: var(--mpk-primary);
  text-decoration: none;
}

.mpk-maker-list__more::after {
  content: "›";
  font-size: 1.15em;
  line-height: 1;
}

.mpk-maker-list__more:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   4. モデル一覧テーブル
       横スクロール + ヘッダー行の固定 + 1列目（モデル名）の固定。
   -------------------------------------------------------------------------- */
.entry-content .mpk-model-table {
  margin: var(--mpk-space-xl) 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--mpk-border);
  border-radius: var(--mpk-radius-md);
}

.entry-content .mpk-model-table table {
  width: 100%;
  min-width: 560px;
  margin: 0;
  font-size: var(--mpk-fs-sm);
  line-height: 1.7;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
}

/* ヘッダー行 */
.entry-content .mpk-model-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px var(--mpk-space-md);
  font-size: var(--mpk-fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--mpk-surface);
  background-color: var(--mpk-primary);
  border: 0;
  border-bottom: 1px solid var(--mpk-primary-dark);
}

/* 本体セル */
.entry-content .mpk-model-table td,
.entry-content .mpk-model-table tbody th {
  padding: 12px var(--mpk-space-md);
  vertical-align: top;
  background-color: var(--mpk-surface);
  border: 0;
  border-bottom: 1px solid var(--mpk-border);
  transition: background-color var(--mpk-transition);
}

.entry-content .mpk-model-table tbody tr:last-child td,
.entry-content .mpk-model-table tbody tr:last-child th {
  border-bottom: 0;
}

/* 縞は入れず、ホバーで行を示す（情報密度が高い表を読みやすくする） */
.entry-content .mpk-model-table tbody tr:nth-child(even) td {
  background-color: var(--mpk-surface);
}

.entry-content .mpk-model-table tbody tr:hover td,
.entry-content .mpk-model-table tbody tr:hover th {
  background-color: var(--mpk-primary-tint);
}

/* 1列目（モデル名）を固定して、横スクロール中も見失わないようにする */
.entry-content .mpk-model-table thead th:first-child,
.entry-content .mpk-model-table tbody td:first-child,
.entry-content .mpk-model-table tbody th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  font-weight: 700;
  white-space: nowrap;
  text-align: left;
  box-shadow: 1px 0 0 var(--mpk-border);
}

.entry-content .mpk-model-table thead th:first-child {
  z-index: 3;
  box-shadow: 1px 0 0 var(--mpk-primary-dark);
}

.entry-content .mpk-model-table tbody td:first-child {
  color: var(--mpk-text);
}

/* 数値列 */
.entry-content .mpk-model-table td.mpk-num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* 未掲載・未検証のセル */
.entry-content .mpk-model-table td:empty::after,
.mpk-model-table .mpk-na {
  content: "—";
  color: var(--mpk-text-muted);
}

/* 出典キャプション */
.entry-content .mpk-model-table + .mpk-table-source,
.mpk-table-source {
  margin: calc(var(--mpk-space-xl) * -1 + var(--mpk-space-xs)) 0 var(--mpk-space-xl);
  font-size: var(--mpk-fs-xs);
  line-height: 1.7;
  color: var(--mpk-text-muted);
}

@media screen and (max-width: 640px) {
  .entry-content .mpk-model-table table {
    min-width: 520px;
  }

  .entry-content .mpk-model-table thead th,
  .entry-content .mpk-model-table td,
  .entry-content .mpk-model-table tbody th {
    padding: 10px var(--mpk-space-sm);
  }
}

/* --------------------------------------------------------------------------
   5. サイドバーを出さないページ（メーカー個別ページ）
       base.css で .content-in を flex にしているため、幅の指定を戻す。
   -------------------------------------------------------------------------- */
@media screen and (min-width: 1024px) {
  .no-sidebar main.main {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }

  .no-sidebar div.sidebar {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   6. データテーブル（絞り込み + 列ソート）
       JavaScript が無効なら素の表として読める。以下は後付けUIのスタイル。
   -------------------------------------------------------------------------- */
.mpk-dt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--mpk-space-sm) var(--mpk-space-md);
  margin: var(--mpk-space-xl) 0 var(--mpk-space-sm);
}

.mpk-dt-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--mpk-space-xs);
  margin: 0;
}

.mpk-dt-filter__label {
  font-size: var(--mpk-fs-xs);
  font-weight: 700;
  color: var(--mpk-text-muted);
  white-space: nowrap;
}

.mpk-dt-filter__input {
  min-height: 44px;
  min-width: 220px;
  padding: 0 var(--mpk-space-sm);
  font-size: var(--mpk-fs-sm);
  color: var(--mpk-text);
  background-color: var(--mpk-surface);
  border: 1px solid var(--mpk-border-strong);
  border-radius: var(--mpk-radius-sm);
}

.mpk-dt-filter__input:focus {
  border-color: var(--mpk-primary);
  box-shadow: var(--mpk-shadow-focus);
  outline: none;
}

.mpk-dt-count {
  margin: 0;
  font-size: var(--mpk-fs-xs);
  font-variant-numeric: tabular-nums;
  color: var(--mpk-text-muted);
}

/* ソートボタン（ヘッダーセル内） */
.entry-content .mpk-model-table th.mpk-dt-th {
  padding: 0;
}

.mpk-dt-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 8px var(--mpk-space-md);
  font: inherit;
  font-weight: 700;
  color: inherit;
  text-align: left;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color var(--mpk-transition);
}

.mpk-dt-sort:hover {
  background-color: rgba(255, 255, 255, 0.14);
}

.mpk-dt-sort:focus-visible {
  outline: 2px solid var(--mpk-surface);
  outline-offset: -3px;
}

/* 並び順のしるし。未ソートは薄く、ソート中は矢印を出す */
.mpk-dt-sort__marker::before {
  content: "⇅";
  font-size: 0.9em;
  opacity: 0.55;
}

[aria-sort="ascending"] .mpk-dt-sort__marker::before {
  content: "↑";
  opacity: 1;
}

[aria-sort="descending"] .mpk-dt-sort__marker::before {
  content: "↓";
  opacity: 1;
}

/* データテーブル化した表はツールバーと連続して見せる */
.entry-content .mpk-model-table.is-enhanced {
  margin-top: 0;
}

@media screen and (max-width: 640px) {
  .mpk-dt-filter,
  .mpk-dt-filter__input {
    width: 100%;
    min-width: 0;
  }
}

/* 画像ロゴを入れたメーカーは、狭い画面でロゴ枠を詰める */
@media screen and (max-width: 480px) {
  .mpk-maker-card__logo {
    width: 84px;
    height: 34px;
  }

  .mpk-maker-card__logo .mpk-maker-logo {
    max-height: 28px;
  }
}
