/* 💬 Example sentences (js/examples.js): the word in a sentence, with pinyin and small English, after it's
   written. Writing Desk card (DESIGN.md §5); the sentence in the teaching font, the word in the place color. */
.ex-card { --ex-c: #5a48d6; --ex-bg: #ece8ff; display: flex; align-items: center; gap: 12px; background: var(--a-card, #fffdf8); color: var(--a-fg, #1d2233);
  border-radius: 20px; box-shadow: 0 1px 0 rgba(29,34,51,.05), 0 12px 26px -14px rgba(80,50,20,.38); padding: 12px 18px 12px 12px;
  max-width: min(680px, 100%); text-align: left; animation: ex-in .2s ease-out; }
.ex-card .ex-hear { flex: none; width: 48px; height: 48px; border: 0; border-radius: 999px; background: var(--a-word-bg, #f6efe2); font-size: 20px; cursor: pointer; }
.ex-card .ex-hear:active { transform: translateY(2px); }
.ex-card .ex-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ex-card .ex-zh { font-family: "Kaiti SC", "STKaiti", "KaiTi", "Kaiti TC", serif; font-size: 28px; line-height: 1.3; text-wrap: pretty; }
.ex-card .ex-zh em { font-style: normal; color: var(--ex-c); background: var(--ex-bg); border-radius: 8px; padding: 0 4px; }
.ex-card .ex-py { font: 700 15px/1.3 var(--f-body, Nunito, sans-serif); color: #4d4a55; }
.ex-card .ex-en { font: 700 14px/1.3 var(--f-body, Nunito, sans-serif); color: var(--a-mute, #7b7266); }
@keyframes ex-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ex-card { animation: none; } }

/* 听写: after marking, the board shows the word and its sentence (in the 听写's pink) */
#dictation .d-main .d-card.d-exboard { display: flex !important; flex-direction: column !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: center !important; gap: clamp(10px, 3vh, 28px); }
#dictation .d-exword { display: flex; flex-direction: column; align-items: center; gap: 6px; }
#dictation .d-exword b { font-family: "Kaiti SC", "STKaiti", "KaiTi", "Kaiti TC", serif; font-weight: 400; font-size: clamp(64px, 16vmin, 150px); line-height: 1; white-space: nowrap; color: var(--a-fg, #1d2233); }
#dictation .d-exword.ok b { color: #1f8f5b; }
#dictation .d-exword span { font: 800 17px/1.3 var(--f-body, Nunito, sans-serif); color: var(--a-mute, #7b7266); text-align: center; }
#dictation .d-ex { --ex-c: #d9437a; --ex-bg: #fde3ee; }
#dictation .d-sent { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.05; }
#dictation .d-sent[hidden] { display: none; }
#dictation .d-sent small { font-size: 13px; font-weight: 800; color: var(--a-mute, #7b7266); }
/* a word with 句 or 子 in it: no Chinese on the button while it's written (LANGUAGE.md rule 2) */
#dictation .d-sent.no-zh .d-sent-zh { display: none; }
#dictation .d-sent.no-zh small { font-size: 16px; color: inherit; }
#dictation .d-sent.no-zh small::before { content: "💬 "; }
@media (max-width: 500px) { #dictation .d-sent:not(.no-zh) small { display: none; } }

/* Write it!: in the side column under the word card and Pao Pao, where the box and buttons don't need the room
   (Mac mini check 2026-10-31: under the box it pushed Again / Next off an iPad's screen) */
#write .w-ex:empty { display: none; }
#write .w-ex-card { max-width: 100%; padding: 10px 14px 10px 10px; gap: 10px; }
#write .w-ex-card .ex-zh { font-size: 22px; }
#write .w-ex-card .ex-hear { width: 44px; height: 44px; }
/* short screens (and a phone sideways, the iPad layout scaled down): the card takes Pao Pao's place */
@media (max-height: 760px) { #write.w-after .w-side:has(.w-ex .ex-card) .w-coach { display: none; } }
html.phone-side #write.w-after .w-side:has(.w-ex .ex-card) .w-coach { display: none; }
html.phone-side #write .w-ex-card .ex-zh { font-size: 26px; }
html.phone-side #write .w-ex-card .ex-py, html.phone-side #write .w-ex-card .ex-en { font-size: 17px; }
/* upright: in Pao Pao's row, under the box */
#write.w-tall .w-ex { grid-row: 4; }
#write.w-tall.w-after .w-side:has(.w-ex .ex-card) .w-coach { display: none; }
/* small screens: one compact card */
@media (max-height: 520px), (max-width: 500px) {
  .ex-card { padding: 8px 12px 8px 8px; gap: 8px; }
  .ex-card .ex-hear { width: 44px; height: 44px; font-size: 18px; }
  .ex-card .ex-zh { font-size: 20px; }
  .ex-card .ex-py { font-size: 13px; }
  .ex-card .ex-en { font-size: 13px; }
}

/* 🧩 选词填空 Which word fits? (js/fillblank.js): the sentence with a blank the size of the word, then four of the
   kid's words (the answer buttons are the host's: Write it!'s w-btn, the Lab's big-btn) */
.fb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(720px, 100%); margin-inline: auto; text-align: center; padding: 4px 8px; }
.fb-tag { display: inline-flex; align-items: baseline; gap: 8px; font: 800 15px/1.2 var(--f-body, Nunito, sans-serif); color: var(--a-mute, #7b7266); }
.fb-tag b { font-family: "Kaiti SC", "STKaiti", "KaiTi", "Kaiti TC", serif; font-weight: 400; font-size: 22px; color: #5a48d6; }
.fb-zh { font-family: "Kaiti SC", "STKaiti", "KaiTi", "Kaiti TC", serif; font-size: clamp(28px, 5.2vmin, 46px); line-height: 1.45; color: var(--a-fg, #1d2233); text-wrap: pretty; padding-inline: 44px; }
.fb-gap { display: inline-block; vertical-align: -0.12em; width: calc(var(--n, 2) * 1.05em + .3em); height: 1.05em; margin: 0 .12em;
  border: 3px dashed #5a48d6; border-radius: 10px; background: #ece8ff; }
.fb-word { font-style: normal; border-radius: 10px; padding: 0 .12em; animation: ex-in .2s ease-out; }
.fb-word.right { color: #146c43; background: #d7f7e6; }
.fb-word.wrong { color: #3d2fa8; background: var(--pyc-miss-soft, #eeeaff); }
.fb-py { font: 700 17px/1.35 var(--f-body, Nunito, sans-serif); color: #4d4a55; }
.fb-en { font: 700 15px/1.35 var(--f-body, Nunito, sans-serif); color: var(--a-mute, #7b7266); }
.fb-en[hidden] { display: none; }
.fb-hear { position: absolute; top: 34px; right: 0; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--a-word-bg, #f6efe2); font-size: 18px; cursor: pointer; }
.fb-hear:active { transform: translateY(2px); }
.fb-keys { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(100%, 620px); margin-inline: auto; }
.fb-keys > button { min-width: 0; min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.fb-keys .pyc-forgot-row { grid-column: 1 / -1; }
.fb-o { font-family: "Kaiti SC", "STKaiti", "KaiTi", "Kaiti TC", serif; font-weight: 400; font-size: 34px; line-height: 1.05; }
.fb-op { font: 700 14px/1.1 var(--f-body, Nunito, sans-serif); opacity: .8; }
.fb-keys > button.right { background: #d7f7e6 !important; border-color: #2ec27e !important; color: #146c43 !important; }
.fb-keys > button.wrong { background: var(--pyc-miss-soft, #eeeaff) !important; border-color: var(--pyc-miss, #5a48d6) !important; color: #3d2fa8 !important; animation: pyc-shake .4s; }
#write .w-actions.fb-keys { gap: 12px; }
#write #w-boxes:has(> .fb) { display: flex; align-items: center; justify-content: center; }
/* the Game Lab's card over the game (LabKit ctx.whichWord) */
.lab-fit-card { width: min(760px, 100%); display: flex; flex-direction: column; gap: 12px; }
.lab-fit-say { min-height: 1.3em; }
.lab-fit-keys { display: flex; justify-content: center; }
.lab-fit-keys.fb-keys { display: grid !important; }
@media (max-height: 520px), (max-width: 500px) {
  .fb { gap: 4px; }
  .fb-zh { font-size: 24px; padding-inline: 40px; }
  .fb-hear { top: 26px; }
  .fb-py { font-size: 15px; }
  .fb-keys { gap: 8px; }
  .fb-keys > button { min-height: 56px; }
  .fb-o { font-size: 26px; }
  .lab-fit-card { padding: 12px 14px; gap: 6px; }
}
/* "I forgot": a quiet link-like button under the choices, never a fifth answer */
.fb-keys .fb-forgot { min-height: 44px; padding: 6px 18px; border: 0; background: none; box-shadow: none; font: 800 17px/1.2 var(--f-body, Nunito, sans-serif); color: var(--a-mute, #7b7266); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* a real phone sideways renders a 720px-tall iPad at ~0.55 scale (js/phonefit.js): blow these up so text stays 15pt+ and buttons 44pt+ */
/* Write it!: bigger type in the same room, the four choices in one row */
html.phone-side #write .fb { gap: 2px; }
html.phone-side #write .fb-tag { font-size: 22px; }
html.phone-side #write .fb-tag b { font-size: 30px; }
html.phone-side #write .fb-zh { font-size: 44px; line-height: 1.3; padding-inline: 90px; }
html.phone-side #write .fb-py, html.phone-side #write .fb-en { font-size: 26px; }
html.phone-side #write .fb-hear { width: 80px; height: 80px; font-size: 32px; top: 30px; }
html.phone-side #write .w-actions.fb-keys { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
html.phone-side #write .fb-keys > button { min-height: 84px; }
html.phone-side #write .fb-o { font-size: 46px; }
html.phone-side #write .fb-op { font-size: 24px; }
html.phone-side #write .fb-forgot { min-height: 80px; font-size: 28px; }
/* the Lab's card: the whole card scaled once (never its insides too) */
@media (min-height: 600px) { html.phone-side .lab-fit-card { zoom: 1.5; width: min(500px, 100%); padding: 10px 14px; gap: 4px; } }
html.phone-side .lab-fit-card .fb { gap: 2px; }
html.phone-side .lab-fit-card .fb-zh { font-size: 28px; }
html.phone-side .lab-fit-card .fb-keys { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
html.phone-side .lab-fit-card .fb-keys > button { min-height: 60px; }
html.phone-side .lab-fit-card .fb-o { font-size: 28px; }
