/* Nhiều môn: thẻ môn học, nhãn Lý/Hóa/Sinh, từ vựng, câu tiếng Anh có nút đọc, bảng. */

.subjects { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.subject { display: block; text-decoration: none; color: var(--ink); text-align: center; margin: 0; padding: 22px 16px; transition: transform .15s; }
.subject:active { transform: scale(.98); }
.subject-icon { font-size: 44px; line-height: 1.1; }
.subject-name { font-weight: 800; font-size: 19px; margin: 6px 0 2px; }

.strand.ly, .strand-chip.ly { color: #1f6fb2; }
.strand.hoa, .strand-chip.hoa { color: #c0692b; }
.strand.sinh, .strand-chip.sinh { color: #2e7d4f; }
.strand-chip { display: inline-block; font-weight: 700; padding: 0 8px; border-radius: 99px; background: var(--accent-soft); font-size: 13px; }
.strand-chip.ly { background: #e3eefa; }
.strand-chip.hoa { background: #fbeee3; }
.strand-chip.sinh { background: #e3f2e8; }

/* Nút loa */
.say-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--accent-soft); font-size: 18px; cursor: pointer; touch-action: manipulation;
  display: inline-grid; place-items: center; vertical-align: middle; margin-right: 6px;
}
.say-btn.sm { width: 30px; height: 30px; font-size: 14px; }
.say-btn:active { transform: scale(.92); }

/* Bảng từ vựng */
.vocab { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 12px 0; }
.vw { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.vw-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.vw-en { font-weight: 800; font-size: 18px; }
.vw-pos { font-size: 12px; color: var(--accent); font-weight: 700; background: var(--accent-soft); border-radius: 6px; padding: 0 6px; }
.vw-ipa { color: var(--ink-3); font-size: 15px; font-family: "Lucida Sans Unicode", "Segoe UI", sans-serif; }
.vw-vi { margin-top: 4px; }
.vw-ex { margin-top: 6px; font-size: 15px; color: var(--ink-2); display: flex; align-items: flex-start; gap: 4px; }

/* Câu tiếng Anh có nút đọc */
.say-line { display: flex; align-items: flex-start; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.say-en { font-weight: 600; }
.say-vi { color: var(--ink-3); font-size: 15px; }

/* Bảng chung */
.tbl-wrap { overflow-x: auto; margin: 12px 0; -webkit-overflow-scrolling: touch; }
.tbl { border-collapse: collapse; min-width: 100%; background: var(--paper); border-radius: 10px; overflow: hidden; font-size: 16px; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.tbl th { background: var(--accent-soft); font-weight: 700; }

/* Ô gõ chữ */
.txt-in {
  flex: 1; min-width: 200px; min-height: 52px; font-size: 20px; padding: 8px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); font-family: var(--font);
}

@media (max-width: 560px) {
  .vocab { grid-template-columns: 1fr; }
  .subjects { grid-template-columns: 1fr 1fr; }
  .subject-icon { font-size: 36px; }
}
