/* DMM公開サイト v2 - Gold & Navy Theme */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700&family=Noto+Sans+JP:wght@400;700&display=swap');

:root {
  --gold-dark:   #b8922a;
  --gold-mid:    #c8a84b;
  --gold-light:  #f5d78e;
  --gold-grad:   linear-gradient(135deg, #c8a84b 0%, #f5d78e 50%, #c8a84b 100%);
  --navy:        #1a2744;
  --navy-light:  #243460;
  --white:       #ffffff;
  --bg:          #f8f7f4;
  --text:        #2c2c2c;
  --text-light:  #666;
  --border:      #e8e0cc;
  --shadow:      0 2px 12px rgba(0,0,0,0.08);
  --radius:      12px;
  --font-ja:     "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-digit:  "Orbitron", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-x: hidden; }

body {
  font-family: var(--font-ja);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ヘッダー */
.site-header {
  background: var(--navy);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.site-header img {
  display: block;
  width: 100%;
  max-height: 63px;
  object-fit: cover;
}

/* エラーメッセージ */
.warning {
  background: #fff0f0;
  border-left: 4px solid #e53935;
  color: #c62828;
  font-weight: bold;
  font-size: 15px;
  margin: 16px;
  padding: 12px 16px;
  border-radius: 8px;
}

/* セクションタイトル */
.section-title {
  font-family: var(--font-digit);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 20px 16px 8px;
}

/* リストカード */
.card-list {
  list-style: none;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-list li a {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  border-left: 4px solid var(--gold-mid);
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  gap: 8px;
  min-height: 52px;
}
.card-list li a:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
/* 機種名・タイプ名は左寄せで展開、最大2行で省略 */
.card-list li a .label-text {
  flex: 1;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
/* 台数は右端固定 */
.card-list li a .label-count {
  font-family: var(--font-digit);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-dark);
  white-space: nowrap;
  margin-left: auto;
  padding-right: 4px;
  flex-shrink: 0;
}
/* 矢印は常に右端 */
.card-list li a::after {
  content: "›";
  font-size: 22px;
  color: var(--gold-mid);
  font-weight: normal;
  flex-shrink: 0;
}
.card-list li.new a {
  border-left-color: var(--gold-dark);
}
.card-list li.new a::before {
  content: "NEW";
  background: var(--gold-grad);
  color: var(--navy);
  font-family: var(--font-digit);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* 台番号カード（dai_no一覧） */
.dai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 12px;
}
.dai-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px 8px;
  text-decoration: none;
  color: var(--navy);
  font-family: var(--font-digit);
  font-size: 15px;
  font-weight: 700;
  border-bottom: 3px solid var(--gold-mid);
  transition: transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.05em;
}
.dai-grid a:active { transform: scale(0.95); }

/* 検索フォーム */
.search-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 12px;
  padding: 16px;
}
.search-box label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  color: var(--text-light);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.search-box input[type=text] {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.search-box input[type=text]:focus {
  border-color: var(--gold-mid);
}
.search-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  background: var(--gold-grad);
  color: var(--navy);
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.05em;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
}
.search-btn:active { opacity: 0.85; }

/* トップ3バッジ */
.rank-badge {
  font-family: var(--font-digit);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.rank-badge.rank-1 {
  background: linear-gradient(135deg, #ffd700, #ffec6e);
  color: #7a5500;
}
.rank-badge.rank-2 {
  background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
  color: #444;
}
.rank-badge.rank-3 {
  background: linear-gradient(135deg, #cd7f32, #e8a96a);
  color: #fff;
}

/* 台データヘッダー */
.dai-header {
  background: var(--navy);
  padding: 16px;
  margin-bottom: 12px;
}
.dai-header .dai-no {
  font-size: 13px;
  color: var(--gold-light);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dai-header .dai-name {
  font-size: 20px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
  line-height: 1.4;
}
.dai-header .dai-stats {
  display: flex;
  gap: 12px;
}
.dai-header .stat-item {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 12px;
  flex: 1;
  text-align: center;
}
.dai-header .stat-label {
  font-size: 11px;
  color: var(--gold-light);
  display: block;
  margin-bottom: 2px;
}
.dai-header .stat-value {
  font-family: var(--font-digit);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.05em;
}

/* データテーブル */
.data-table-wrap {
  margin: 0 12px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table thead tr {
  background: var(--navy);
}
.data-table thead td {
  color: var(--gold-light);
  font-weight: bold;
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.03em;
}
.data-table tbody tr:nth-child(odd)  { background: #fafafa; }
.data-table tbody tr:nth-child(even) { background: var(--white); }
.data-table tbody td {
  padding: 10px 8px;
  text-align: right;
  font-family: var(--font-digit);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.03em;
}
.data-table tbody td:first-child {
  text-align: center;
  font-family: var(--font-ja);
  color: var(--text-light);
  font-size: 13px;
  font-weight: 400;
}
.data-table tbody td.highlight {
  font-family: var(--font-digit);
  color: var(--gold-dark);
  font-size: 15px;
  font-weight: 700;
}

/* グラフ */
.graph-wrap {
  margin: 0 12px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.graph-title {
  font-size: 13px;
  font-weight: bold;
  color: var(--text-light);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.graph-wrap canvas {
  width: 100% !important;
  max-width: 100%;
}

/* 前後ボタン */
.nav-buttons {
  display: flex;
  gap: 10px;
  padding: 0 12px 16px;
}
.nav-btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-family: var(--font-digit);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
  letter-spacing: 0.05em;
}
.nav-btn:active { opacity: 0.8; }
.nav-btn.prev {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
}
.nav-btn.next {
  background: var(--gold-grad);
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(200,168,75,0.4);
}

/* ナビリンク */
.nav-list {
  list-style: none;
  padding: 0 12px 8px;
}
.nav-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  padding: 8px 0;
}
.nav-list li a::before {
  content: "‹";
  font-size: 20px;
}

/* 注意書き */
.remarks {
  margin: 16px 12px;
  padding: 14px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gold-mid);
  color: var(--text-light);
  font-size: 12px;
  line-height: 1.7;
}
.remarks h5 {
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 8px;
  font-weight: bold;
}

/* フッター */
.site-footer {
  text-align: center;
  padding: 20px 16px 32px;
}
.site-footer img {
  max-width: 160px;
  opacity: 0.7;
}
