/* 🔤 the shared pinyin check (js/pinyincheck.js): the word's characters, a sound under each, and the answer keys.
   Buttons wear the host screen's own button class; this adds the states. Hosts set phone sizes on their screen. */
.pyc { display: flex; justify-content: center; align-items: flex-end; gap: 28px; animation: pyc-in .25s ease-out; }
.pyc-col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pyc-hz { font-family: var(--f-kai, "Kaiti SC", "STKaiti", "KaiTi", serif); font-size: var(--hz, 150px); line-height: 1; color: var(--ink, #1d2233); }
.pyc-syl {
  min-width: 128px; min-height: 64px; box-sizing: border-box; padding: 6px 16px; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; border: 3px solid var(--ink, #1d2233); border-radius: 18px; box-shadow: 0 4px 0 var(--ink, #1d2233);
  font-family: var(--f-body, inherit); font-weight: 900; font-size: 38px; line-height: 1; color: var(--ink, #1d2233); cursor: pointer;
}
.pyc-pick .pyc-syl { cursor: default; color: #9aa0ad; border-style: dashed; box-shadow: none; }
.pyc-syl.on { border-color: var(--violet, #7a5cff); box-shadow: 0 4px 0 var(--violet-deep, #5134d0), 0 0 0 4px var(--violet-ring, #e3dbff); }
.pyc-syl.right { background: #d7f7e6; border: 3px solid #2ec27e; box-shadow: 0 4px 0 #1e9e62; color: #146c43; }
/* a miss is "not yet", never red (DESIGN.md §3): the activity's own violet, and a gentle shake */
.pyc-syl.wrong { background: var(--pyc-miss-soft, #eeeaff); border: 3px solid var(--pyc-miss, #5a48d6); box-shadow: 0 4px 0 var(--pyc-miss, #5a48d6); color: #3d2fa8; animation: pyc-shake .4s; }
.pyc-t { font-style: normal; font-size: .55em; width: 1.3em; height: 1.3em; border-radius: 50%; display: grid; place-items: center; background: var(--violet-soft, #efe9ff); color: var(--violet-deep, #5134d0); }
.pyc-o { font-family: var(--f-body, inherit); font-weight: 900; font-size: 30px; letter-spacing: .5px; }

/* the answer keys */
.pyc-keys button.right { background: #d7f7e6; border-color: #2ec27e; box-shadow: 0 4px 0 #1e9e62; color: #146c43; opacity: 1; }
.pyc-keys button.wrong { background: var(--pyc-miss-soft, #eeeaff); border-color: var(--pyc-miss, #5a48d6); box-shadow: 0 4px 0 var(--pyc-miss, #5a48d6); color: #3d2fa8; opacity: 1; animation: pyc-shake .4s; }
/* the tones step: the shared keyboard's tone row (PinyinKeys.html, letters off; its pink keys are style.css .dict-key.tone).
   A bare .dict-kb has no tray, so this gives it one, and sizes the keys for a row of five */
.pyc-tonekeys { gap: 12px; }
.pyc-kb { flex: none; gap: var(--pyc-g, 6px); padding: 12px 14px 14px; background: #efe6d6; border: 0; border-radius: 22px; }
.pyc-kb .dict-kb-row { gap: var(--pyc-g, 6px); }
.pyc-kb .dict-key.tone { flex: none; width: calc(var(--pyc-kw, 58px) * 1.5); min-width: 0; height: var(--pyc-kh, 58px); padding: 0;
  border: 0; border-radius: 14px; font-size: 26px; }
.pyc-kb .dict-key.tone .tone-mark { width: clamp(20px, var(--pyc-kh, 58px) * 0.58, 38px); height: auto; aspect-ratio: 1; }
.pyc-kb .dict-key.tone small { font-size: 16px; letter-spacing: -0.02em; }
/* "I forgot": the only way past (DESIGN.md §13), a quiet button on its own line under the keys, worded as everywhere */
.pyc-keys { flex-wrap: wrap; }
.pyc-forgot-row { flex: 0 0 100%; display: flex; justify-content: center; }
.pyc-forgot:disabled { visibility: hidden; }
@keyframes pyc-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes pyc-in { 0% { transform: scale(.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* 💬 the meaning check (js/meaningcheck.js): the word, a blank for its meaning, and four English answers in two rows */
.mnc .pyc-col { gap: 18px; }
.mnc-hz { white-space: nowrap; }
.mnc-q {
  min-width: 220px; max-width: 92vw; min-height: 64px; box-sizing: border-box; padding: 8px 22px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 3px dashed #9aa0ad; border-radius: 18px; color: #9aa0ad;
  font-family: var(--f-body, inherit); font-weight: 900; font-size: 34px; line-height: 1.1; text-align: center;
}
.mnc-q.right { background: #d7f7e6; border: 3px solid #2ec27e; box-shadow: 0 4px 0 #1e9e62; color: #146c43; }
.mnc-q.wrong { background: var(--pyc-miss-soft, #eeeaff); border: 3px solid var(--pyc-miss, #5a48d6); box-shadow: 0 4px 0 var(--pyc-miss, #5a48d6); color: #3d2fa8; animation: pyc-shake .4s; }
.mnc-keys { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 680px); margin-inline: auto; }
.mnc-keys > button { min-width: 0; }
.mnc-keys .pyc-forgot-row { grid-column: 1 / -1; }
.mnc-o { font-family: var(--f-body, inherit); font-weight: 800; font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
