/* ---------- Phát âm & trọng âm (phon.js) ---------- */
.ph-st { color: var(--red-d); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 3px; font-weight: 900; }
.ph-dot { color: var(--muted); margin: 0 1px; }
.ph-dots { display: inline-flex; gap: 5px; align-items: center; vertical-align: middle; }
.ph-dots i { width: 12px; height: 12px; border-radius: 50%; background: #D9D2C3; display: block; }
.ph-dots i.s { width: 20px; height: 20px; background: var(--ink); }
.ph-u { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; text-decoration-color: var(--blue); font-weight: 900; }
.ph-ipa { font-weight: 700; color: var(--teal-d); font-size: 15px; margin-left: 4px; }
.ph-big { font-size: 20px; }

/* cửa vào 2 lượt ôn */
.ph-door { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; border-radius: 22px; padding: 16px 18px; color: #fff; cursor: pointer; position: relative;
  box-shadow: 0 5px 0 var(--cd); font: inherit; }
.ph-door:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--cd); }
.ph-door .em { font-size: 40px; line-height: 1; }
.ph-door b { display: block; font-family: 'Baloo 2'; font-size: 22px; font-weight: 800; line-height: 1.1; }
.ph-door small { display: block; opacity: .92; font-weight: 700; font-size: 14px; margin-top: 2px; }
.ph-door .badge { background: #fff; color: var(--red); border-radius: 999px; min-width: 30px; padding: 2px 9px; font-weight: 900; font-family: 'Baloo 2'; font-size: 17px; text-align: center; }
.ph-door-stress { background: var(--red); --cd: var(--red-d); }
.ph-door-sound { background: var(--teal); --cd: var(--teal-d); }

/* thẻ gợi ý sau bài sai */
.ph-nudge { background: linear-gradient(135deg, #FFF1D6, #FFE2EC); border: 3px solid #FFD3A1; border-radius: 20px; padding: 12px 14px; }
.ph-owl { font-size: 34px; line-height: 1; }
.ph-wrow { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-w { display: inline-block; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 5px 10px; font-weight: 800; box-shadow: 0 3px 0 #E9DFC9; font-size: 16px; font-family: inherit; color: inherit; }
.ph-w.bad { border-color: #F8C9D5; }
button.ph-w { cursor: pointer; }

/* ô âm tiết */
.ph-syls { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.ph-syl { min-width: 60px; padding: 12px 10px 8px; border-radius: 18px; background: #fff; border: 3px solid var(--line); cursor: pointer; color: var(--ink);
  font-family: 'Baloo 2'; font-weight: 800; font-size: 28px; line-height: 1.1; box-shadow: 0 4px 0 #E9DFC9; transition: transform .15s; }
.ph-syl small { display: block; font-family: 'Nunito'; font-size: 12px; color: var(--muted); font-weight: 800; }
.ph-syl:active { transform: translateY(3px); box-shadow: 0 1px 0 #E9DFC9; }
.ph-syl:disabled { cursor: default; opacity: 1; filter: none; }
.ph-syl.ok { border-color: var(--green); background: #E3F7EC; box-shadow: 0 4px 0 #BCE8CF; transform: scale(1.14); color: var(--green-d); }
.ph-syl.bad { border-color: var(--red); background: #FDE5EB; box-shadow: 0 4px 0 #F8C9D5; }
.ph-syl.hint { border-style: dashed; border-color: var(--green); color: var(--green-d); }
body[data-band="g12"] .ph-syl, body[data-band="g35"] .ph-syl { font-size: 32px; min-width: 72px; }

/* đếm âm tiết, đuôi -ed / -s */
.ph-claps, .ph-ends { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-claps .opt, .ph-ends .opt { flex-direction: column; justify-content: center; text-align: center; gap: 2px; min-height: 76px; padding: 8px 4px; }
.ph-claps .opt b, .ph-ends .opt b { font-family: 'Baloo 2'; font-size: 24px; }
.ph-ends .opt small { color: var(--muted); font-weight: 700; font-size: 12px; }
.ph-orow { gap: 6px; }
.ph-orow .opt { min-width: 0; }

/* quy tắc "Vì sao?" */
.ph-rule { background: #FFF6DA; border: 2px dashed #F2CF6B; border-radius: 14px; padding: 10px 12px; margin-top: 10px; font-size: 15px; }
.ph-rule summary { cursor: pointer; list-style: none; }
.ph-rule summary::-webkit-details-marker { display: none; }
.ph-rule p { margin-top: 6px; }
.ph-tag { display: inline-block; font-size: 12px; font-weight: 900; padding: 2px 8px; border-radius: 999px; background: #F3EEFF; color: var(--purple-d); vertical-align: 1px; }
.ph-tag.ex { background: #FDE5EB; color: var(--red-d); }
.ph-ex { display: inline-block; margin-right: 8px; }

/* phân loại nhanh */
.ph-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ph-col { background: #FBF8F1; border-radius: 16px; border: 3px dashed var(--line); padding: 8px; min-height: 150px; cursor: pointer; }
.ph-col h3 { font-size: 15px; text-align: center; margin-bottom: 6px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.ph-in { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.ph-in .ph-w { background: #F3FBF6; border-color: #BCE8CF; box-shadow: none; font-size: 15px; }
.ph-pool { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 44px; }
.ph-card { cursor: pointer; touch-action: manipulation; }
.ph-card.on { border-color: var(--blue); background: #EAF2FF; transform: translateY(-3px); box-shadow: 0 6px 12px rgba(37,99,208,.18); }

/* cặp từ đổi nghĩa */
.ph-pairv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ph-pv { background: #FBF8F1; border-radius: 14px; padding: 10px; font-size: 20px; }
.ph-pv small { display: block; font-size: 13px; color: var(--muted); font-weight: 700; margin-top: 2px; }

.ph-stars { font-size: 34px; letter-spacing: 4px; }
