/* fragments.css — styles for HTML fragments loaded in /game/index.php */

/* ── Common: headings and text ── */
#schedule h3,
#total h3,
#total_year h3,
#generic h3,
#record h3,
#same h3,
#joryu_total h3 {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #1a3060;
  color: #1a3060;
}

#schedule p,
#total p,
#total_year p,
#generic p,
#record p,
#same p,
#joryu_total p {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: #555;
}

p.appendix,
p.note {
  font-size: 0.8rem;
  color: #666;
  background: #f8f8f8;
  border-left: 3px solid #aab;
  padding: 0.4rem 0.6rem;
  margin-bottom: 1rem;
}

/* ── Common: tables ── */
#schedule table,
#total table,
#total_year table,
#generic table,
#record table,
#same table,
#joryu_total table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

#schedule table caption,
#total table caption,
#total_year table caption,
#generic table caption,
#record table caption,
#same table caption,
#joryu_total table caption {
  font-weight: bold;
  font-size: 0.9rem;
  text-align: left;
  padding: 0.3rem 0;
  color: #1a3060;
  margin-bottom: 0.2rem;
}

#schedule table th,
#total table th,
#total_year table th,
#generic table th,
#record table th,
#same table th,
#joryu_total table th {
  background: #1a3060;
  color: #fff;
  padding: 0.4rem 0.5rem;
  text-align: center;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

#schedule table td,
#total table td,
#total_year table td,
#generic table td,
#record table td,
#same table td,
#joryu_total table td {
  padding: 0.35rem 0.5rem;
  border: 1px solid #e0e0e0;
  vertical-align: middle;
}

#schedule table tr:nth-child(even) td,
#total table tr:nth-child(even) td,
#total_year table tr:nth-child(even) td,
#generic table tr:nth-child(even) td,
#record table tr:nth-child(even) td,
#joryu_total table tr:nth-child(even) td {
  background: #f5f7fa;
}

/* ── Column alignment: #total, #total_year (棋士名|対局数|勝数|負数|勝率) ── */
#total table th:nth-child(1),
#total table td:nth-child(1),
#total_year table th:nth-child(1),
#total_year table td:nth-child(1) {
  text-align: left;
}
#total table th:nth-child(n+2),
#total table td:nth-child(n+2),
#total_year table th:nth-child(n+2),
#total_year table td:nth-child(n+2) {
  text-align: right;
}

/* ── Column alignment: #joryu_total (棋士名|対局数|勝数|負数|勝率) ── */
#joryu_total table th:nth-child(1),
#joryu_total table td:nth-child(1) {
  text-align: left;
}
#joryu_total table th:nth-child(n+2),
#joryu_total table td:nth-child(n+2) {
  text-align: right;
}

/* ── Column alignment: #record (位|棋士名|数値[|期間]) ── */
#record table th:nth-child(1),
#record table td:nth-child(1) {
  text-align: center;
  width: 2.5rem;
}
#record table th:nth-child(2),
#record table td:nth-child(2) {
  text-align: left;
}
#record table th:nth-child(3),
#record table td:nth-child(3) {
  text-align: right;
}
#record table th:nth-child(4),
#record table td:nth-child(4) {
  text-align: left;
}

/* ── Column alignment: #generic (段位/勝数|棋士名|残り) ── */
#generic table th:nth-child(1),
#generic table td:nth-child(1) {
  text-align: center;
}
#generic table th:nth-child(2),
#generic table td:nth-child(2) {
  text-align: left;
}
#generic table th:nth-child(3),
#generic table td:nth-child(3) {
  text-align: right;
}

/* ── Column alignment: #same (順位|棋士名|対戦成績|棋士名|対局数|持) ── */
#same table th:nth-child(1),
#same table td:nth-child(1) {
  text-align: center;
  width: 2.5rem;
}
#same table th:nth-child(2),
#same table td:nth-child(2),
#same table th:nth-child(4),
#same table td:nth-child(4) {
  text-align: left;
}
#same table th:nth-child(3),
#same table td:nth-child(3) {
  text-align: center;
}
#same table th:nth-child(5),
#same table td:nth-child(5) {
  text-align: right;
}
#same table th:nth-child(6),
#same table td:nth-child(6) {
  text-align: center;
  width: 2rem;
}

/* ── Column alignment: #schedule (○●|先手|後手|○●|棋戦|備考|対局場) ── */
#schedule table {
  min-width: max-content;
}
#schedule {
  overflow-x: auto;
}
#schedule table th:nth-child(1),
#schedule table td:nth-child(1),
#schedule table th:nth-child(4),
#schedule table td:nth-child(4) {
  text-align: center;
  width: 1.8rem;
}
#schedule table th:nth-child(2),
#schedule table td:nth-child(2),
#schedule table th:nth-child(3),
#schedule table td:nth-child(3),
#schedule table th:nth-child(5),
#schedule table td:nth-child(5),
#schedule table th:nth-child(6),
#schedule table td:nth-child(6),
#schedule table th:nth-child(7),
#schedule table td:nth-child(7) {
  text-align: left;
}
#schedule table td:nth-child(5) {
  white-space: nowrap;
}

/* ── Record: ranking divs ── */
div.ranking {
  margin-bottom: 1rem;
}

/* ── Same: highlighted rows (現役同士) ── */
#same tr.obi td {
  background: #fff8e1;
}
#same tr.obi:nth-child(even) td {
  background: #fff3cc;
}

/* ── joryu_total: row alternates ── */
TR.row1 td {
  background: #fff;
}
TR.row2 td {
  background: #f0f4fa;
}

/* ── joryu_total: vskishi table ── */
table#vskishi caption {
  margin-top: 1.5rem;
}

td.subtotal {
  font-weight: bold;
  background: #eaf0fb !important;
  border-top: 1px solid #aab;
}

/* ── ul lists in schedule fragments ── */
#schedule ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: #555;
}

#schedule ul li {
  margin-bottom: 0.2rem;
}

/* ── Links inside fragments ── */
#schedule a,
#same a {
  color: #1a5276;
  text-decoration: underline;
}

/* ── div#append (used in all_lady / year_result_lady) ── */
#append {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: #555;
}
