/* ============ 小朋友单词卡 #/kids ============ */
.kids {
  --k-bg: #FBF6EF;
  --k-sun: #F2B544;
  --k-good: #4F9A5E;
  --k-bad: #D2604B;
  min-height: 100vh; min-height: 100dvh; background: var(--k-bg);
  display: flex; flex-direction: column; user-select: none; -webkit-user-select: none;
}
.kids button { border: 0; background: none; padding: 0; }
.kids .grow { flex: 1; }

.k-head { display: flex; align-items: center; gap: 16px; padding: 14px 24px 6px; }
.k-back { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 22px; }
.k-back:hover { border-color: var(--clay); }
.k-title { font-weight: 700; font-size: 22px; line-height: 1.05; }
.k-title small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: .08em; }
.k-modes { margin-left: auto; display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.k-modes button { padding: 9px 20px; border-radius: 999px; font-weight: 600; font-size: 16px; color: var(--ink-2); }
.k-modes button.on { background: var(--clay); color: #fff; }
.k-stars { font-size: 20px; font-weight: 700; background: #FFF4D6; border-radius: 999px; padding: 7px 16px; color: #7A5A12; font-variant-numeric: tabular-nums; }

.k-books { display: flex; gap: 8px; padding: 8px 24px; overflow-x: auto; align-items: center; scrollbar-width: none; }
.k-books::-webkit-scrollbar { display: none; }
.k-books button { white-space: nowrap; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); }
.k-books button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.k-books .k-tog { color: var(--ink-3); }
.k-books .k-tog::before { content: "○ "; }
.k-books .k-tog.on { background: #EAF3EC; color: var(--k-good); border-color: #CFE3D4; }
.k-books .k-tog.on::before { content: "● "; }

.k-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 12px 96px 48px; min-height: 0; }
.k-empty { text-align: center; font-size: 20px; line-height: 1.7; color: var(--ink-2); padding: 60px 20px; margin: auto; }
.k-audio-status { margin: 4px 24px 8px; padding: 10px 14px; border: 1px solid #D7B6A6; border-radius: 12px; background: #FFF9F2; color: var(--clay-deep); font-size: 15px; line-height: 1.6; text-align: center; }
.k-audio-status[hidden] { display: none; }
.kids .k-audio-status button { padding: 3px 10px; border: 1px solid currentColor; border-radius: 8px; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.k-audio-status button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* 图片 */
.k-pic { width: 100%; aspect-ratio: 1; border-radius: 32px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(80,50,30,.10), 0 0 0 1px rgba(80,50,30,.05); display: grid; place-items: center; }
.k-pic img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.k-ph span { font-size: clamp(64px, 14vh, 150px); font-weight: 700; color: rgba(34,26,22,.55); letter-spacing: -.02em; }

/* 看图学 */
.k-card { display: grid; grid-template-columns: min(60vh, 44vw, 560px) minmax(0, 480px); gap: clamp(28px, 5vw, 72px); align-items: center; }
.k-picbtn { display: block; width: 100%; cursor: pointer; transition: transform .15s; animation: kIn .35s ease; }
.k-picbtn:active { transform: scale(.98); }
@keyframes kIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.k-words { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; animation: kIn .35s ease .05s both; }
.k-word { font-size: clamp(54px, 9vw, 112px); font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--ink); text-align: left; word-break: break-word; cursor: pointer; }
.k-mean { font-size: clamp(24px, 3.4vw, 40px); font-weight: 500; color: var(--clay-deep); min-height: 1.2em; }
.k-nozh .k-mean { visibility: hidden; }
.k-sent { font-size: clamp(18px, 2.2vw, 26px); color: var(--ink-2); line-height: 1.4; text-align: left; cursor: pointer; display: flex; gap: 10px; align-items: baseline; margin-top: 6px; }
.k-sent i { font-style: normal; font-size: .8em; }
.k-sent:hover { color: var(--ink); }
.k-ctrl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(100%, 360px); margin-top: 18px; }
.kids .k-big { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; min-height: 60px; padding: 16px 24px; border: 1px solid transparent; border-radius: 20px; background: var(--clay-deep); color: #fff; font-size: 20px; font-weight: 700; line-height: 1.2; white-space: nowrap; cursor: pointer; box-shadow: 0 4px 0 rgba(112, 57, 40, .18); transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s; }
.kids .k-big.ghost { background: #FFF9F2; color: var(--clay-deep); border-color: #D7B6A6; box-shadow: 0 4px 0 rgba(112, 57, 40, .07); }
.k-big svg { width: 24px; height: 24px; flex: none; }
@media (hover: hover) {
  .kids .k-big:hover { background: #95513E; box-shadow: 0 5px 0 rgba(112, 57, 40, .2); transform: translateY(-1px); }
  .kids .k-big.ghost:hover { background: #F6E6DF; border-color: var(--clay-deep); box-shadow: 0 5px 0 rgba(112, 57, 40, .09); }
}
.kids .k-big:active { background: #854635; box-shadow: 0 1px 0 rgba(112, 57, 40, .18); transform: translateY(3px); }
.kids .k-big.ghost:active { background: #EFDBCF; border-color: var(--clay-deep); box-shadow: 0 1px 0 rgba(112, 57, 40, .09); }
.kids .k-big:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

.k-arrow { position: absolute; top: 50%; transform: translateY(-60%); width: 68px; height: 68px; border-radius: 50%; background: var(--card) !important; box-shadow: 0 4px 16px rgba(80,50,30,.12); font-size: 44px; line-height: 1; color: var(--ink); cursor: pointer; display: grid; place-items: center; padding-bottom: 6px !important; }
.k-arrow.prev { left: 18px; }
.k-arrow.next { right: 18px; }
.k-arrow:disabled { opacity: .25; cursor: default; }
.k-arrow:not(:disabled):hover { background: #fff !important; color: var(--clay-deep); }
.k-dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; font-size: 14px; color: var(--ink-3); font-weight: 600; }
.k-dots i { width: 8px; height: 8px; border-radius: 50%; background: #E2D4C8; transition: all .2s; }
.k-dots i.on { width: 22px; border-radius: 4px; background: var(--clay); }

/* 听音选图 */
.k-quiz { display: flex; flex-direction: column; align-items: center; gap: 22px; width: 100%; }
.k-ask { display: flex; align-items: center; gap: 14px; font-size: 40px; background: var(--card) !important; border-radius: 999px; padding: 12px 28px 12px 20px !important; box-shadow: 0 6px 20px rgba(80,50,30,.10); cursor: pointer; transition: transform .12s; }
.k-ask span { font-size: 20px; font-weight: 600; color: var(--ink-2); }
.k-ask:active { transform: scale(.96); }
.k-opts { display: grid; gap: clamp(14px, 2.4vw, 28px); width: 100%; justify-content: center; }
.k-opts.n2 { grid-template-columns: repeat(2, min(46vh, 34vw)); }
.k-opts.n3 { grid-template-columns: repeat(3, min(46vh, 28vw)); }
.k-opts.n4 { grid-template-columns: repeat(4, min(40vh, 21vw)); }
.k-opt { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 10px; border-radius: 34px; transition: transform .15s, opacity .3s; }
.k-opt:hover:not(:disabled) { transform: translateY(-4px); }
.k-opt .k-pic { border-radius: 28px; outline: 6px solid transparent; outline-offset: 0; transition: outline-color .2s; }
.k-optword { font-size: 22px; font-weight: 700; color: var(--ink); visibility: hidden; }
.k-opt.right .k-pic { outline-color: var(--k-good); animation: kBounce .5s ease; }
.k-opt.right .k-optword { visibility: visible; color: var(--k-good); }
.k-opt.wrong { opacity: .35; animation: kShake .4s ease; }
.k-opt.wrong .k-pic { outline-color: var(--k-bad); }
.k-opt.fade { opacity: .25; }
/* 没有图片的选项要显示字母块，单词本身也露出来 */
.k-opt .k-ph + .k-optword { visibility: visible; }
@keyframes kShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes kBounce { 40% { transform: scale(1.05); } }
.k-feedback { min-height: 40px; font-size: 26px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.k-feedback b { color: var(--k-good); font-size: 30px; }
.k-pop { display: inline-block; animation: kPop .5s cubic-bezier(.3,1.6,.5,1); font-size: 32px; }
@keyframes kPop { from { transform: scale(.2); opacity: 0; } }

/* 竖屏 / 手机 */
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .k-head { padding: 12px 16px 4px; gap: 10px; flex-wrap: wrap; }
  .k-title { font-size: 18px; }
  .k-modes button { padding: 7px 14px; font-size: 14px; }
  .k-stars { font-size: 16px; padding: 5px 12px; }
  .k-books { padding: 6px 16px; }
  .k-stage { padding: 8px 16px 44px; align-items: flex-start; }
  .k-card { grid-template-columns: 1fr; gap: 18px; width: min(100%, 520px); }
  .k-words { align-items: center; text-align: center; }
  .k-word, .k-sent { text-align: center; justify-content: center; }
  .k-ctrl { margin-top: 8px; }
  .kids .k-big { min-height: 56px; padding: 14px 16px; border-radius: 18px; font-size: 17px; }
  .k-arrow { display: none; }
  .k-dots { bottom: 12px; }
  .k-quiz { gap: 16px; }
  .k-ask { font-size: 30px; }
  .k-ask span { font-size: 16px; }
  .k-opts.n2, .k-opts.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-opts.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-opts { max-width: 520px; }
  .k-optword { font-size: 17px; }
}
@media (max-width: 760px) {
  .k-modes { order: 3; margin-left: 0; }
  .k-streak { margin-left: auto; }
}

/* 打卡 */
.k-streak { font-size: 20px; font-weight: 700; background: #F6E3DA; border-radius: 999px; padding: 7px 16px; color: var(--clay-deep); text-decoration: none; font-variant-numeric: tabular-nums; }
.k-streak:hover { background: #F0D5C8; }
.k-party { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; pointer-events: none; animation: kFade 3.2s ease forwards; }
.k-party-card { background: #fff; border-radius: 32px; padding: 30px 48px; text-align: center; box-shadow: 0 20px 60px rgba(80,50,30,.25); display: flex; flex-direction: column; gap: 6px; animation: kPop .6s cubic-bezier(.3,1.6,.5,1); }
.k-party-icon { font-size: 64px; line-height: 1; }
.k-party b { font-size: 30px; color: var(--k-good); }
.k-party span:last-child { font-size: 18px; color: var(--ink-2); }
@keyframes kFade { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 760px) {
  .k-streak { font-size: 16px; padding: 5px 12px; }
  .k-party-card { padding: 22px 32px; }
  .k-party b { font-size: 24px; }
}
