/* 17-giai-the-co.css: Thư 27: Chế độ Giải thế cờ (60 thế 1–3 nước), Thế cờ mỗi ngày và huy hiệu 10/30/60.
   Nạp cuối cùng sau 16-tra-quan-moi-ban-gop-hang.css; chỉ dùng biến :root và khoảng cách bội số của 4px. */

  /* Thẻ Giải thế cờ trong ngăn kéo Đấu với máy / Chơi một mình */
  #hop-sanh-may .sanh-the-co { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
  .stc-trai { display: flex; align-items: center; gap: 12px; flex: 1 1 200px; min-width: 0; }
  .stc-ic { width: 44px; height: 44px; border-radius: var(--bo-nut); background: var(--mat-cao); border: 1px solid var(--dong-vien-mo); color: var(--dong-nhat); display: grid; place-items: center; flex: none; }
  .stc-ic svg { width: 20px; height: 20px; display: block; }
  .stc-chu { flex: 1; min-width: 0; display: grid; gap: 4px; }
  .stc-nhan-hang { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
  .stc-nhan-hang small { font-size: var(--co-12); color: var(--dong-nhat); font-weight: 600; }
  .stc-chuoi { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: var(--bo-tron); background: var(--son-nen); border: 1px solid var(--dong-vien-mo); color: var(--dong-sang); font-size: var(--co-12); font-weight: 700; white-space: nowrap; }
  .stc-chuoi svg { width: 14px; height: 14px; display: block; flex: none; }
  .stc-tien-do { font-size: var(--co-12); color: var(--chu-phu); font-variant-numeric: tabular-nums; }
  .stc-chu b { font-family: var(--serif); font-size: var(--co-16); color: var(--chu-sang); line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
  .stc-chu > span { font-size: var(--co-12); color: var(--chu-mo); line-height: 1.3; }
  .stc-nut { display: flex; align-items: center; gap: 8px; flex: none; }
  .stc-nut .nut { min-height: 44px; margin: 0; padding: 8px 12px; font-size: var(--co-14); white-space: nowrap; }

  @media (max-width: 440px) {
    #hop-sanh-may .hop { padding: 8px 12px 12px; }
    #hop-sanh-may .hop-dau { margin-bottom: 4px; }
    #hop-sanh-may .ngan-may-hang { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
    #hop-sanh-may #nut-may { grid-column: 1 / -1; }
    #hop-sanh-may .sanh-the-co { margin-top: 8px; padding: 8px; }
    .stc-ic { width: 36px; height: 36px; }
    .stc-nut { width: 100%; }
    .stc-nut .nut { flex: 1 1 0; }
  }
  @media (min-width: 600px) and (max-height: 520px) {
    #hop-sanh-may .hop { padding: 8px 16px; }
    #hop-sanh-may .hop-dau { margin-bottom: 4px; }
    #hop-sanh-may .hop-dau h2 { font-size: var(--co-20); }
    #hop-sanh-may .hom-nay { padding: 4px 12px; }
    #hop-sanh-may .hn-tuong img { width: 44px; height: 56px; }
    #hop-sanh-may .sanh-the-co { margin-top: 4px; padding: 4px 12px; }
    #hop-sanh-may .ngan-may-hang { margin-top: 4px; }
    .stc-ic { width: 36px; height: 36px; }
    .stc-chu > span { display: none; }
  }
  @media (max-width: 440px) and (max-height: 680px) {
    #hop-sanh-may .hop { padding: 8px 12px; }
    #hop-sanh-may .ngan-tay { margin-bottom: 4px; }
    #hop-sanh-may .hop-dau { margin-bottom: 4px; }
    #hop-sanh-may .hom-nay { margin-top: 4px; padding: 8px; }
    #hop-sanh-may .hn-tuong { gap: 4px 8px; }
    #hop-sanh-may .ngan-may-hang { margin-top: 4px; gap: 4px; }
    .stc-chu > span { display: none; }
  }

  /* Hộp thoại Giải thế cờ (#hop-the-co) */
  #hop-the-co .hop { width: min(100%, 620px); display: grid; gap: 8px; }
  #hop-the-co .hop-dau { margin-bottom: 0; }
  .tc-ngay-khung { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px; border-radius: var(--bo-nut); background: var(--mat-cao); border: 1px solid var(--dong-vien-mo); }
  .tc-ngay-trai { flex: 1 1 220px; min-width: 0; display: grid; gap: 4px; }
  .tc-ngay-nhan { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  .tc-tag-ngay { font-size: var(--co-12); font-weight: 700; color: var(--dong-nhat); }
  .tc-chuoi-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: var(--bo-tron); background: var(--son-nen); border: 1px solid var(--dong-vien-mo); color: var(--dong-sang); font-size: var(--co-12); font-weight: 600; }
  .tc-chuoi-chip svg { width: 14px; height: 14px; display: block; flex: none; }
  .tc-chuoi-chip.kgy { background: var(--ngoc-nen); border-color: var(--ngoc-sang); color: var(--ngoc-chu-nhat); }
  .tc-ngay-trai b { font-family: var(--serif); font-size: var(--co-16); color: var(--chu-sang); line-height: 1.25; }
  .tc-ngay-trai small { font-size: var(--co-12); color: var(--chu-phu); line-height: 1.3; }
  .tc-ngay-nut { min-height: 44px; padding: 8px 16px; margin: 0; white-space: nowrap; flex: none; }

  .tc-tien-do-hang { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
  .tc-tien-chu { font-size: var(--co-12); font-weight: 600; color: var(--chu-phu); font-variant-numeric: tabular-nums; }
  .tc-moc-ds { display: flex; flex-wrap: wrap; gap: 4px; }
  .tc-moc { font-size: var(--co-12); padding: 4px 8px; border-radius: var(--bo-tron); background: var(--nen-o); border: 1px solid var(--vien-chia); color: var(--chu-mo); }
  .tc-moc.dat { background: var(--ngoc-nen); border-color: var(--ngoc-sang); color: var(--ngoc-chu-nhat); font-weight: 600; }

  .tc-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0; }
  .tc-tabs .chip { min-height: 44px; padding: 4px 8px; margin: 0; display: grid; place-items: center; align-content: center; gap: 0; text-align: center; white-space: normal; line-height: 1.15; }
  .tc-tabs .chip b { font-size: var(--co-14); font-weight: 600; }
  .tc-tabs .chip small { font-size: var(--co-12); opacity: .82; }
  .tc-phan-trang { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .tc-phan-trang .chip { min-height: 44px; padding: 4px 8px; margin: 0; font-size: var(--co-12); font-variant-numeric: tabular-nums; }

  .tc-ds { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  .tc-muc { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border-radius: var(--bo-nut); background: var(--nen-o); border: 1px solid var(--vien-nhe); color: var(--chu); font: inherit; text-align: left; cursor: pointer; transition: transform var(--tg-nhanh) var(--cong-ra), opacity var(--tg-nhanh) var(--cong-ra); }
  .tc-muc:hover { border-color: var(--dong); background: var(--mat-cao); }
  .tc-muc.xong { border-color: var(--ngoc); }
  .tc-stt { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: var(--co-12); font-weight: 700; background: var(--mat); border: 1px solid var(--vien-nhe); color: var(--dong-nhat); font-variant-numeric: tabular-nums; }
  .tc-muc.xong .tc-stt { background: var(--ngoc-nen); border-color: var(--ngoc-sang); color: var(--ngoc-chu-nhat); }
  .tc-stt svg { width: 20px; height: 20px; display: block; }
  .tc-thong-tin { flex: 1; min-width: 0; display: grid; gap: 0; }
  .tc-thong-tin b { font-size: var(--co-14); color: var(--chu-sang); white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  .tc-thong-tin small { font-size: var(--co-12); color: var(--chu-mo); line-height: 1.25; }
  .tc-vao { font-size: var(--co-12); font-weight: 600; color: var(--dong-nhat); padding: 4px 8px; border-radius: var(--bo-tron); background: var(--mat); border: 1px solid var(--vien-chia); flex: none; white-space: nowrap; }
  .hs-hh-chip.the-co { border-color: var(--dong); background: var(--mat-cao); color: var(--dong-nhat); }

  @media (max-width: 640px) and (max-height: 700px) {
    #hop-the-co .hop { padding: 8px 12px; gap: 4px; }
    .tc-ngay-khung { padding: 8px; gap: 8px; }
    .tc-ngay-trai small, .tc-tien-do-hang { display: none; }
    .tc-ds { gap: 4px; }
    .tc-muc { min-height: 44px; padding: 4px 8px; gap: 8px; }
  }
  @media (min-width: 600px) and (max-height: 520px) {
    #hop-the-co .hop { width: min(100%, 760px); padding: 8px 12px; gap: 4px; }
    #hop-the-co .hop-dau h2 { font-size: var(--co-20); }
    .tc-ngay-khung { padding: 4px 12px; }
    .tc-ngay-trai small, .tc-tien-do-hang { display: none; }
    .tc-ds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
    .tc-muc { min-height: 44px; padding: 4px 8px; gap: 8px; }
  }
  @media (max-height: 640px) and (min-width: 900px) {
    #hop-the-co .hop { width: min(100%, 760px); padding: 12px 16px; gap: 8px; }
    .tc-ds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  }
