/* kid-theme.css — Design tokens + static utility classes for kid-components.js */

/* ── Tokens ── */
:root {
  --kk-bg-app:       #0f0a1e;
  --kk-bg-hdr:       linear-gradient(160deg,#1a0f35,#2d1a5e);
  --kk-c-xp:         #ffd700;
  --kk-c-green:      #3caa6b;
  --kk-c-purple:     #a855f7;
  --kk-c-next:       #68d8a0;
  --kk-text-mid:     rgba(255,255,255,0.75);
  --kk-text-dim:     rgba(255,255,255,0.35);
  --kk-text-faint:   rgba(255,255,255,0.28);
  --kk-border-sub:   rgba(255,255,255,0.06);
  --kk-border-dim:   rgba(255,255,255,0.10);
  --kk-r-sm:  10px;
  --kk-r-md:  14px;
  --kk-r-lg:  18px;
  --kk-r-xl:  20px;
  --kk-r-xxl: 22px;
  --kk-r-pill:99px;
}

/* ── Phone Shell ── */
.kk-phone {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  font-family: Nunito, sans-serif;
}

/* ── Headers ── */
.kk-hdr {
  background: var(--kk-bg-hdr);
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--kk-border-sub);
}
.kk-hdr-row { display: flex; justify-content: space-between; align-items: flex-start; }
.kk-hdr-btns { display: flex; align-items: center; gap: 8px; }
.kk-hdr-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em;
  color: var(--kk-text-dim); text-transform: uppercase; margin-bottom: 4px;
}
.kk-hdr-title  { font-size: 20px; font-weight: 900; color: #fff; line-height: 1.2; }
.kk-hdr-sub    { font-size: 12px; color: var(--kk-text-dim); margin-top: 2px; }

/* ── XP Pill ── */
.kk-xp-pill    { background: rgba(255,255,255,0.08); border-radius: 14px; padding: 8px 12px; min-width: 78px; }
.kk-xp-level   { font-size: 11px; font-weight: 900; color: var(--kk-c-xp); white-space: nowrap; }
.kk-xp-name    { font-size: 12px; font-weight: 800; color: #fff; margin-top: 1px; white-space: nowrap; }
.kk-xp-track   { margin-top: 4px; background: rgba(255,255,255,0.15); border-radius: var(--kk-r-pill); height: 4px; overflow: hidden; }
.kk-xp-fill    { height: 100%; border-radius: var(--kk-r-pill); background: linear-gradient(90deg,#ffd700,#ff9500); transition: width 0.5s; }
.kk-xp-hint    { font-size: 9px; color: var(--kk-text-dim); margin-top: 2px; white-space: nowrap; }

/* ── Icon Buttons (40×40) ── */
.kk-btn-icon {
  width: 40px; height: 40px; border-radius: 12px; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; font-family: Nunito, sans-serif; flex-shrink: 0;
}
.kk-btn-badge  { background: rgba(255,215,0,0.12);   border: 1.5px solid rgba(255,215,0,0.35); }
.kk-btn-mute   { background: rgba(255,255,255,0.07); border: 1.5px solid rgba(255,255,255,0.12); }
.kk-btn-mute.active { background: rgba(255,100,100,0.15); border-color: rgba(255,100,100,0.4); }
.kk-btn-parent { background: rgba(168,85,247,0.18);  border: 1.5px solid rgba(168,85,247,0.45); }

/* ── Overall progress bar ── */
.kk-total-prog { margin-top: 14px; }
.kk-total-prog-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--kk-text-dim); margin-bottom: 5px; font-weight: 700; }
.kk-total-track { background: rgba(255,255,255,0.1); border-radius: var(--kk-r-pill); height: 7px; overflow: hidden; }
.kk-total-fill  { height: 100%; border-radius: var(--kk-r-pill); background: linear-gradient(90deg,#a855f7,#68d8a0); transition: width 0.5s; }

/* ── Scroll containers ── */
.kk-scroll    { flex: 1; overflow-y: auto; padding: 14px 14px 24px; }
.kk-adv-scroll{ flex: 1; overflow-y: auto; padding: 16px 14px 24px; }

/* ── Section label ── */
.kk-section-label { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.3); margin-bottom: 14px; }

/* ── Confetti ── */
.kk-confetti { position: absolute; top: 0; left: 0; right: 0; height: 300px; overflow: hidden; pointer-events: none; z-index: 20; }

/* ── Daily challenge card ── */
.kk-daily-card {
  border-radius: var(--kk-r-xl); overflow: hidden; margin-bottom: 14px; cursor: pointer;
  border: 1.5px solid rgba(255,215,0,0.45);
  box-shadow: 0 0 0 2px rgba(255,215,0,0.12), 0 8px 28px rgba(0,0,0,0.5);
}
.kk-daily-shimmer { height: 2px; background: linear-gradient(90deg,#ffd700,#ff9500,#ffd700); background-size: 200%; animation: shimmer 2s infinite; }
.kk-daily-banner  { height: 115px; position: relative; overflow: hidden; }

/* ── Next-challenge card ── */
.kk-next-card {
  border-radius: var(--kk-r-xl); overflow: hidden; margin-bottom: 14px; cursor: pointer;
  border: 1.5px solid rgba(104,216,160,0.3);
  box-shadow: 0 0 0 2px rgba(104,216,160,0.08), 0 6px 20px rgba(0,0,0,0.4);
  animation: fadeUp 0.3s ease;
}
.kk-next-banner { height: 90px; position: relative; overflow: hidden; }

/* ── Shared banner helpers ── */
.kk-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kk-card-emoji { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

.kk-badge-topleft {
  position: absolute; top: 10px; left: 14px;
  font-size: 10px; font-weight: 900; color: var(--kk-c-xp);
  letter-spacing: 0.1em; text-transform: uppercase; text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.kk-badge-topright { position: absolute; top: 8px; right: 12px; }
.kk-status-done {
  font-size: 11px; font-weight: 800; color: var(--kk-c-green);
  background: rgba(60,170,107,0.25); border: 1px solid rgba(60,170,107,0.45);
  border-radius: var(--kk-r-pill); padding: 3px 10px; backdrop-filter: blur(4px);
}
.kk-status-xp {
  font-size: 10px; font-weight: 900; color: var(--kk-c-xp);
  background: rgba(255,215,0,0.2); border: 1.5px solid rgba(255,215,0,0.5);
  border-radius: var(--kk-r-pill); padding: 3px 10px; backdrop-filter: blur(4px);
}
.kk-banner-bottom { position: absolute; bottom: 10px; left: 14px; right: 14px; }
.kk-banner-title {
  font-size: 15px; font-weight: 900; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.kk-next-label {
  position: absolute; top: 9px; left: 14px;
  font-size: 10px; font-weight: 900; color: var(--kk-c-next);
  letter-spacing: 0.1em; text-transform: uppercase; text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.kk-next-bottom  { position: absolute; bottom: 9px; left: 14px; right: 28px; }
.kk-next-title   { font-size: 13px; font-weight: 900; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 6px rgba(0,0,0,0.7); }
.kk-next-world   { font-size: 10px; color: rgba(104,216,160,0.85); margin-top: 2px; font-weight: 700; }
.kk-chevron-abs  { position: absolute; bottom: 12px; right: 14px; font-size: 16px; color: rgba(255,255,255,0.35); }

/* ── World cards ── */
.kk-world-btn { width: 100%; border: none; cursor: pointer; background: transparent; padding: 0; margin-bottom: 14px; text-align: left; font-family: Nunito, sans-serif; }
.kk-world-shell { border-radius: var(--kk-r-xxl); overflow: hidden; }
.kk-world-shell.normal      { border: 1.5px solid rgba(255,255,255,0.10); }
.kk-world-shell.recommended { border: 1.5px solid rgba(255,215,0,0.65); box-shadow: 0 0 0 3px rgba(255,215,0,0.18), 0 8px 32px rgba(0,0,0,0.55); }
.kk-world-banner { height: 210px; position: relative; overflow: hidden; }
.kk-world-banner .kk-card-img { position: absolute; inset: 0; }
.kk-world-emoji-bg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 64px; }
.kk-world-accent { position: absolute; top: 0; left: 0; bottom: 0; width: 3.5px; }
.kk-world-badges { position: absolute; top: 10px; right: 12px; display: flex; gap: 6px; align-items: center; }
.kk-badge-complete {
  font-size: 10px; font-weight: 900; background: linear-gradient(135deg,#ffd700,#ffaa00); color: #3a2500;
  padding: 4px 10px; border-radius: var(--kk-r-pill); letter-spacing: 0.02em; box-shadow: 0 2px 8px rgba(255,215,0,0.45);
}
.kk-badge-rec {
  font-size: 10px; font-weight: 900; background: rgba(255,215,0,0.18); color: var(--kk-c-xp);
  border: 1.5px solid rgba(255,215,0,0.6); padding: 4px 10px; border-radius: var(--kk-r-pill);
  backdrop-filter: blur(6px); letter-spacing: 0.03em; box-shadow: 0 2px 12px rgba(255,215,0,0.25);
}
.kk-world-names { position: absolute; bottom: 44px; left: 18px; right: 14px; }
.kk-world-name-cn  { font-size: 22px; font-weight: 900; color: #fff; line-height: 1.2; text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 1px 2px rgba(0,0,0,0.5); }
.kk-world-name-en  { font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 2px; font-weight: 600; letter-spacing: 0.04em; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.kk-world-tagline  { font-size: 11px; color: rgba(255,255,255,0.72); margin-top: 3px; text-shadow: 0 1px 4px rgba(0,0,0,0.6); font-weight: 600; }
.kk-world-strip    { position: absolute; bottom: 0; left: 0; right: 0; padding: 7px 14px 9px; display: flex; align-items: center; gap: 10px; }
.kk-strip-track    { flex: 1; background: rgb(189 189 189 / 40%); border: 1px solid #e9e9e980; border-radius: var(--kk-r-pill); height: 5px; overflow: hidden; }
.kk-strip-fill     { height: 100%; border-radius: var(--kk-r-pill); transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }
.kk-strip-none     { font-size: 10px; color: rgba(255,255,255,0.55); font-weight: 600; flex-shrink: 0; }
.kk-strip-count    { font-size: 12px; font-weight: 900; flex-shrink: 0; letter-spacing: 0.03em; text-shadow: 0 1px 4px rgba(0,0,0,0.7); }

/* ── Adventure Map header ── */
.kk-back-btn {
  background: rgba(255,255,255,0.25); border: none; color: #fff;
  font-size: 12px; font-weight: 800; padding: 5px 12px;
  border-radius: var(--kk-r-pill); cursor: pointer; font-family: Nunito, sans-serif; white-space: nowrap;
}
.kk-adv-hdr    { padding: 16px 18px 18px; }
.kk-adv-row    { display: flex; align-items: center; gap: 12px; }
.kk-adv-thumb  { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; background: rgba(255,255,255,0.15); }
.kk-adv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.kk-adv-world-name    { font-size: 18px; font-weight: 900; color: #fff; }
.kk-adv-world-tagline { font-size: 12px; color: rgba(255,255,255,0.75); }
.kk-adv-xp-row { margin-top: 12px; display: flex; align-items: center; gap: 8px; }
.kk-adv-xp-track { flex: 1; background: rgba(255,255,255,0.2); border-radius: var(--kk-r-pill); height: 6px; overflow: hidden; }
.kk-adv-xp-fill  { height: 100%; background: rgba(255,255,255,0.85); border-radius: var(--kk-r-pill); }
.kk-adv-xp-label { font-size: 12px; color: #fff; font-weight: 800; white-space: nowrap; }

/* ── Adv filter row ── */
.kk-adv-filter { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kk-adv-filter-label { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #aaa; }
.kk-pro-badge { font-size: 10px; font-weight: 800; color: #a855f7; background: #f5eeff; border: 1px solid #d8b4fe; border-radius: var(--kk-r-pill); padding: 3px 9px; }

/* ── Rec card (adv map) ── */
.kk-adv-rec-label { font-size: 10px; font-weight: 900; color: #f0a020; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 7px; }
.kk-adv-rec-card  { border-radius: var(--kk-r-xl); padding: 15px 16px; display: flex; align-items: center; gap: 12px; text-align: left; border: 2px solid rgba(255,255,255,0.35); }
.kk-adv-rec-thumb { width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0; background: rgba(255,255,255,0.22); display: flex; align-items: center; justify-content: center; font-size: 26px; overflow: hidden; }
.kk-adv-rec-thumb img { width: 100%; height: 100%; object-fit: cover; }
.kk-adv-rec-info  { flex: 1; min-width: 0; }
.kk-adv-rec-title { font-size: 15px; font-weight: 900; color: #fff; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kk-adv-rec-trait { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.22); border-radius: var(--kk-r-pill); padding: 3px 9px; font-size: 11px; font-weight: 800; color: #fff; }
.kk-adv-rec-mastery { margin-top: 7px; display: flex; align-items: center; gap: 6px; }
.kk-adv-rec-mtrack  { flex: 1; height: 4px; background: rgba(255,255,255,0.22); border-radius: var(--kk-r-pill); overflow: hidden; }
.kk-adv-rec-mfill   { height: 100%; border-radius: var(--kk-r-pill); background: rgba(255,255,255,0.85); transition: width 0.4s; }
.kk-adv-rec-mlabel  { font-size: 10px; font-weight: 800; color: rgba(255,255,255,0.8); white-space: nowrap; }
.kk-adv-rec-chevron { font-size: 22px; color: rgba(255,255,255,0.75); flex-shrink: 0; }
.kk-adv-all-label   { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #ccc; margin-top: 16px; margin-bottom: 10px; }

/* ── Scenario list ── */
.kk-scenario-btn { width: 100%; border: none; cursor: pointer; background: transparent; padding: 0; margin-bottom: 10px; font-family: Nunito, sans-serif; }
.kk-scenario-row { border-radius: var(--kk-r-lg); padding: 14px 16px; display: flex; align-items: center; gap: 12px; text-align: left; border-width: 1.5px; border-style: solid; }
.kk-scenario-row.s-default { background: #fff;    border-color: #e8e3dc; }
.kk-scenario-row.s-done    { background: #f2faf6; border-color: #3caa6b; }
.kk-scenario-row.s-locked  { background: #fafafa; border-color: #e0d8f0; opacity: 0.85; }
.kk-scenario-row.s-missing { background: #f8f8f8; border-color: #e0e0e0; opacity: 0.55; }
.kk-scenario-thumb { width: 62px; height: 62px; border-radius: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; overflow: hidden; box-shadow: 0 3px 10px rgba(0,0,0,0.12); }
.kk-scenario-thumb.th-done    { background: linear-gradient(135deg,#3caa6b,#5dd890); }
.kk-scenario-thumb.th-locked  { background: linear-gradient(135deg,#e8e0ff,#d4c8f8); }
.kk-scenario-thumb.th-missing { background: linear-gradient(135deg,#e8e8e8,#d8d8d8); }
.kk-scenario-thumb img { width: 100%; height: 100%; object-fit: cover; }
.kk-scenario-info { flex: 1; min-width: 0; }
.kk-scenario-title-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.kk-scenario-title { font-size: 14px; font-weight: 800; }
.kk-s-col-default { color: #1a1714; }
.kk-s-col-done    { color: #1d4f3c; }
.kk-s-col-locked  { color: #7c6a9a; }
.kk-s-col-missing { color: #aaa; }
.kk-chip { font-size: 10px; font-weight: 800; border-radius: var(--kk-r-pill); padding: 2px 7px; flex-shrink: 0; }
.kk-chip-missing   { color: #999; background: #f0f0f0; border: 1px solid #ddd; }
.kk-chip-challenge { color: #f0a020; background: #fff8e0; border: 1px solid #f0c860; }
.kk-s-sub { font-size: 11px; }
.kk-s-pro     { color: #a855f7; font-weight: 700; }
.kk-s-missing { color: #bbb; font-weight: 600; }
.kk-s-en      { color: #aaa; margin-bottom: 6px; }
.kk-trait-pill { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--kk-r-pill); padding: 3px 9px; font-size: 11px; font-weight: 800; border-width: 1px; border-style: solid; }
.kk-mastery-row   { margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.kk-mastery-track { flex: 1; height: 4px; background: #e8e3dc; border-radius: var(--kk-r-pill); overflow: hidden; }
.kk-mastery-fill  { height: 100%; border-radius: var(--kk-r-pill); transition: width 0.4s; }
.kk-mf-done { background: #3caa6b; }
.kk-mf-none { background: #d0cbc4; }
.kk-mastery-label { font-size: 10px; font-weight: 800; white-space: nowrap; }
.kk-ml-done { color: #3caa6b; }
.kk-ml-none { color: #bbb; }
.kk-scenario-action { flex-shrink: 0; text-align: center; min-width: 36px; }
.kk-spin { font-size: 16px; animation: spin 0.7s linear infinite; display: inline-block; }
.kk-s-meta { font-size: 11px; color: #bbb; font-weight: 700; white-space: nowrap; }
.kk-s-badge-emoji { font-size: 20px; margin-top: 4px; }
.kk-s-arrow { font-size: 16px; color: #ddd; margin-top: 4px; }
.kk-s-locked-arrow { font-size: 18px; color: #a855f7; }
.kk-s-missing-ellipsis { font-size: 16px; color: #ccc; }

/* ── Toast ── */
.kk-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #333; color: #fff; border-radius: var(--kk-r-pill);
  padding: 10px 20px; font-size: 13px; font-weight: 800; z-index: 200;
  white-space: nowrap; animation: fadeUp 0.2s ease; pointer-events: none; font-family: Nunito, sans-serif;
}

/* ── Game header ── */
.kk-game-hdr { padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.kk-game-back {
  background: rgba(255,255,255,0.25); border: none; color: #fff;
  font-size: 16px; font-weight: 800; width: 32px; height: 32px;
  border-radius: var(--kk-r-pill); cursor: pointer; font-family: Nunito, sans-serif;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.kk-game-title-wrap { text-align: center; flex: 1; margin: 0 10px; min-width: 0; }
.kk-game-title {
  font-size: 12px; font-weight: 900; color: #fff; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kk-game-hdr-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.kk-voice-btn { border: none; border-radius: var(--kk-r-pill); width: 30px; height: 30px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; transition: background 0.2s; }
.kk-voice-btn.on  { background: rgba(255,255,255,0.35); }
.kk-voice-btn.off { background: rgba(255,255,255,0.15); }
.kk-game-scroll { flex: 1; min-height: 0; overflow-y: auto; }

/* ── Comic card ── */
.kk-comic-card { margin: 10px 14px 0; border-radius: 10px; overflow: hidden; border: 2.5px solid #111; box-shadow: 4px 4px 0 #111; background: #fff; animation: fadeUp 0.35s cubic-bezier(0.22,1,0.36,1) both; }
.kk-comic-img-wrap { position: relative; background: linear-gradient(160deg,#f8f2ff,#ede0ff); min-height: 190px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.kk-comic-img       { width: 100%; height: 200px; object-fit: cover; display: block; transition: opacity 0.3s ease; }
.kk-comic-emoji-fb  { position: absolute; font-size: 88px; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.18)); }
.kk-comic-koko-mood { position: absolute; bottom: 8px; left: 10px; font-size: 26px; animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1); }
.kk-beat-label { position: absolute; top: 8px; left: 10px; background: #111; color: #fff; font-size: 10px; font-weight: 900; padding: 3px 10px; border-radius: var(--kk-r-pill); letter-spacing: 0.5px; font-family: Nunito, sans-serif; }
.kk-comic-btns  { position: absolute; bottom: 10px; right: 12px; display: flex; gap: 6px; align-items: center; }
.kk-comic-lang-btn { background: rgba(0,0,0,0.48); border: none; border-radius: var(--kk-r-pill); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 10px; cursor: pointer; font-family: Nunito, sans-serif; display: flex; align-items: center; gap: 3px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.kk-speak-sm    { background: rgba(0,0,0,0.48); border: none; border-radius: var(--kk-r-pill); color: #fff; font-weight: 800; width: 30px; height: 30px; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-size: 13px; }
.kk-comic-text  { padding: 14px 16px; background: #fff; }
.kk-story-text  { font-size: 13.5px; font-weight: 700; color: #1a1714; line-height: 1.65; }
.kk-dialog-wrap { margin-top: 10px; background: #fffbe6; border: 2px solid #111; border-radius: 10px 10px 10px 4px; padding: 10px 14px; }
.kk-dialog-text { font-size: 12.5px; font-weight: 700; color: #333; line-height: 1.55; }
.kk-sub-text    { color: #888; font-size: 10.5px; margin-top: 3px; font-style: italic; line-height: 1.4; }
.kk-sub-text-sm { color: #888; font-size: 10px; font-style: italic; margin-top: 2px; }

/* ── Normal card ── */
.kk-normal-card  { margin: 10px 14px 0; border-radius: 10px; overflow: hidden; border: 2.5px solid #111; box-shadow: 4px 4px 0 #111; background: #fff; }
.kk-normal-scene { height: 180px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.kk-normal-emoji { font-size: 72px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2)); }
.kk-normal-mood  { position: absolute; top: 8px; right: 12px; background: rgba(255,255,255,0.92); border-radius: var(--kk-r-pill); padding: 4px 10px; font-size: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1); }
.kk-normal-speak { position: absolute; bottom: 10px; right: 12px; }
.kk-speak-btn    { background: rgba(0,0,0,0.4); border: none; border-radius: var(--kk-r-pill); color: #fff; font-size: 13px; font-weight: 800; width: 30px; height: 30px; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.kk-normal-text  { background: #fff; padding: 14px 16px; }

/* ── Choices ── */
.kk-choices-wrap { padding: 12px 14px 20px; }
.kk-choice-label { font-size: 11.5px; font-weight: 800; margin-bottom: 10px; padding-left: 2px; animation: fadeUp 0.4s ease 0.15s both; }
.kk-choice-btn   { display: flex; align-items: center; gap: 12px; width: 100%; border: 2px solid #111; border-radius: 10px; padding: 14px 16px; cursor: pointer; margin-bottom: 10px; text-align: left; font-family: Nunito, sans-serif; transition: transform 0.1s; }
.kk-choice-emoji { width: 40px; height: 40px; border-radius: var(--kk-r-pill); background: rgba(255,255,255,0.55); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.kk-choice-text  { flex: 1; min-width: 0; }
.kk-choice-main  { display: block; font-size: 13.5px; font-weight: 800; line-height: 1.4; }
.kk-choice-sub   { display: block; font-size: 10.5px; font-weight: 500; opacity: 0.5; line-height: 1.3; margin-top: 2px; font-style: italic; }
.kk-choice-speak { flex-shrink: 0; width: 30px; height: 30px; border-radius: var(--kk-r-pill); background: rgba(255,255,255,0.6); border: 1.5px solid rgba(0,0,0,0.08); cursor: pointer; display: flex; align-items: center; justify-content: center; font-weight: 800; }

/* ── Feedback ── */
.kk-feedback-wrap { animation: fadeUp 0.3s ease; }
.kk-feedback-card { border-width: 2px; border-style: solid; border-radius: 18px; padding: 16px; margin-bottom: 12px; text-align: center; }
.kk-feedback-emoji   { font-size: 36px; margin-bottom: 8px; }
.kk-feedback-outcome { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.kk-feedback-sub     { font-size: 11px; color: #888; font-style: italic; margin-top: 1px; }
.kk-affirmation      { margin-top: 12px; background: rgba(255,255,255,0.72); border-radius: 14px; padding: 10px 14px; text-align: left; }
.kk-affirm-row       { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kk-affirm-ok        { font-size: 12px; font-weight: 900; color: #1a6640; }
.kk-affirm-xp        { font-size: 11px; font-weight: 800; background: rgba(255,200,80,0.3); border-radius: var(--kk-r-pill); padding: 2px 9px; color: #8a6000; }
.kk-affirm-trait-row { display: flex; align-items: flex-start; gap: 8px; }
.kk-affirm-emoji     { font-size: 22px; flex-shrink: 0; line-height: 1.2; }
.kk-affirm-name      { font-size: 13px; font-weight: 900; }
.kk-affirm-name-sub  { font-size: 10px; font-weight: 600; opacity: 0.4; margin-left: 6px; }
.kk-affirm-short     { font-size: 11px; font-weight: 600; line-height: 1.45; opacity: 0.68; margin-top: 2px; }
.kk-weak-trait       { margin-top: 8px; border-left: 3px solid #f0a040; padding: 5px 8px; background: rgba(255,160,40,0.08); border-radius: 0 8px 8px 0; }
.kk-weak-text        { font-size: 11px; font-weight: 800; color: #b06000; }
.kk-tip-text         { margin-top: 6px; font-size: 11px; font-weight: 600; color: #666; padding-left: 2px; }
.kk-no-reward        { margin-top: 10px; font-size: 11px; color: #999; font-weight: 600; text-align: center; }
.kk-next-beat-btn    { width: 100%; color: #fff; border: none; border-radius: var(--kk-r-md); padding: 14px; font-size: 14px; font-weight: 800; cursor: pointer; font-family: Nunito, sans-serif; }

/* ── End screen ── */
.kk-end-wrap   { flex: 1; display: flex; flex-direction: column; overflow: auto; position: relative; }
.kk-end-hero   { padding: 28px 20px 22px; text-align: center; }
.kk-end-badge  { font-size: 60px; margin-bottom: 6px; animation: bounce 0.6s ease 0.2s 3 both; }
.kk-end-label  { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.kk-end-title  { font-size: 20px; font-weight: 900; color: #fff; margin-bottom: 10px; }
.kk-end-story  { font-size: 13px; color: rgba(255,255,255,0.8); line-height: 1.6; max-width: 280px; margin: 0 auto; }
.kk-end-xp     { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.2); border-radius: var(--kk-r-pill); padding: 7px 16px; margin-top: 14px; font-size: 14px; font-weight: 800; color: #fff; }
.kk-traits-section { padding: 14px 16px 0; }
.kk-traits-label   { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #aaa; margin-bottom: 10px; }
.kk-trait-row { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; border-width: 1.5px; border-style: solid; }
.kk-trait-check { width: 26px; height: 26px; border-radius: var(--kk-r-pill); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
.kk-trait-text  { flex: 1; font-size: 13px; font-weight: 800; }
.kk-trait-sub   { font-size: 11px; font-weight: 700; opacity: 0.5; }
.kk-insight-section { padding: 10px 16px 0; }
.kk-insight-btn   { width: 100%; border: 1.5px dashed #c8a86e; border-radius: 14px; padding: 12px 16px; background: #fffbf0; cursor: pointer; display: flex; align-items: center; gap: 10px; text-align: left; font-family: Nunito, sans-serif; }
.kk-insight-icon  { font-size: 20px; }
.kk-insight-label { flex: 1; font-size: 13px; font-weight: 800; color: #8a6800; }
.kk-insight-arrow { font-size: 14px; color: #c8a86e; }
.kk-insight-body  { background: #fffbf0; border: 1.5px solid #f0d080; border-radius: 0 0 14px 14px; padding: 14px 16px; border-top: none; margin-top: -2px; }
.kk-insight-text  { font-size: 13px; color: #5a3e00; line-height: 1.65; font-weight: 600; }
.kk-error-card    { margin: 10px 16px 0; border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; animation: fadeUp 0.4s ease 0.3s both; }
.kk-error-icon { font-size: 28px; flex-shrink: 0; }
.kk-error-title{ font-size: 13px; font-weight: 900; color: #333; margin-bottom: 2px; }
.kk-error-sub  { font-size: 11px; color: #888; line-height: 1.4; }
.kk-fatigue-card  { background: #fff8f0; border: 1.5px solid #ffd0a0; }
.kk-refusal-card  { background: #f0f8ff; border: 1.5px solid #90c8ff; }
.kk-distract-card { background: #fff0f8; border: 1.5px solid #ffb0d8; }
.kk-frustration   { margin: 10px 16px 0; border-radius: 16px; padding: 16px; background: linear-gradient(135deg,#f0f4ff,#e8eeff); border: 1.5px solid #c0ccff; text-align: center; animation: fadeUp 0.4s ease 0.5s both; }
.kk-frust-moon    { font-size: 36px; margin-bottom: 6px; animation: bounce 0.6s ease 0.7s 2 both; }
.kk-frust-title   { font-size: 14px; font-weight: 900; color: #3a4a8a; margin-bottom: 4px; }
.kk-frust-sub     { font-size: 12px; color: #6678b0; line-height: 1.5; }
.kk-end-actions   { padding: 14px 16px 20px; margin-top: auto; }
.kk-btn-primary   { width: 100%; color: #fff; border: none; border-radius: var(--kk-r-md); padding: 14px; font-size: 14px; font-weight: 800; cursor: pointer; margin-bottom: 8px; font-family: Nunito, sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; }
.kk-btn-map       { width: 100%; border-radius: var(--kk-r-md); padding: 13px; font-size: 13px; font-weight: 800; cursor: pointer; margin-bottom: 8px; font-family: Nunito, sans-serif; }
.kk-btn-map.ghost { background: transparent; color: #1d4f3c; border: 2px solid #1d4f3c; }
.kk-btn-map.solid { background: linear-gradient(135deg,#1d4f3c,#2d7a5a); color: #fff; border: none; }
.kk-btn-replay    { width: 100%; background: transparent; color: #888; border: 1.5px solid #e0dbd4; border-radius: var(--kk-r-md); padding: 11px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: Nunito, sans-serif; }
.kk-btn-sleep     { width: 100%; background: linear-gradient(135deg,#3a4a8a,#5566cc); color: #fff; border: none; border-radius: var(--kk-r-md); padding: 14px; font-size: 14px; font-weight: 800; cursor: pointer; margin-bottom: 8px; font-family: Nunito, sans-serif; }

/* ── Exit confirm ── */
.kk-exit-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.65); z-index: 30; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadeUp 0.2s ease both; }
.kk-exit-dialog  { background: #fff; border-radius: 24px; padding: 24px 20px; text-align: center; width: 100%; max-width: 320px; box-shadow: 0 16px 48px rgba(0,0,0,0.4); }
.kk-exit-bear    { font-size: 40px; margin-bottom: 10px; }
.kk-exit-title   { font-size: 17px; font-weight: 900; color: #1a1714; margin-bottom: 6px; }
.kk-exit-sub     { font-size: 13px; color: #888; line-height: 1.5; margin-bottom: 20px; }
.kk-exit-leave   { width: 100%; background: #e74c3c; color: #fff; border: none; border-radius: 14px; padding: 13px; font-size: 14px; font-weight: 800; cursor: pointer; font-family: Nunito, sans-serif; margin-bottom: 8px; }
.kk-exit-stay    { width: 100%; background: transparent; color: #555; border: 1.5px solid #e0dbd4; border-radius: 14px; padding: 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: Nunito, sans-serif; }

/* ── Loading/missing states ── */
.kk-loading-wrap  { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; text-align: center; }
.kk-loading-spin  { font-size: 48px; margin-bottom: 16px; animation: spin 1s linear infinite; }
.kk-loading-emoji { font-size: 48px; margin-bottom: 16px; }
.kk-loading-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.kk-loading-sub   { font-size: 14px; color: #888; margin-bottom: 24px; }
.kk-btn-back-solid{ background: #1d4f3c; color: #fff; border: none; border-radius: 14px; padding: 12px 24px; font-size: 14px; font-weight: 800; cursor: pointer; font-family: Nunito, sans-serif; }

/* ── Badge Room ── */
.kk-badge-hdr       { background: var(--kk-bg-hdr); padding: 16px 18px 18px; border-bottom: 1px solid var(--kk-border-sub); flex-shrink: 0; }
.kk-badge-back      { background: rgba(255,255,255,0.1); border: none; color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: var(--kk-r-pill); cursor: pointer; font-family: Nunito, sans-serif; margin-bottom: 10px; }
.kk-badge-hdr-inner { text-align: center; }
.kk-badge-hdr-icon  { font-size: 40px; line-height: 1; margin-bottom: 4px; }
.kk-badge-hdr-title { font-size: 18px; font-weight: 900; color: #fff; }
.kk-badge-hdr-en    { font-size: 11px; color: var(--kk-text-dim); margin-top: 2px; }
.kk-badge-hdr-count { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; background: rgba(255,215,0,0.12); border: 1px solid rgba(255,215,0,0.3); border-radius: var(--kk-r-pill); padding: 5px 14px; font-size: 13px; font-weight: 900; color: var(--kk-c-xp); }
.kk-badge-scroll    { flex: 1; overflow-y: auto; padding: 14px 14px 24px; }
.kk-badge-world     { margin-bottom: 22px; }
.kk-badge-world-hdr { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.kk-badge-world-icon{ width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.kk-badge-world-name { font-size: 12px; font-weight: 900; color: rgba(255,255,255,0.75); }
.kk-badge-world-cnt  { font-size: 11px; color: rgba(255,255,255,0.3); margin-left: auto; font-weight: 700; }
.kk-badge-grid  { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.kk-badge-item  { position: relative; border-radius: 14px; padding: 13px 8px; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; border-width: 1.5px; border-style: solid; }
.kk-badge-item.earned { background: rgba(255,215,0,0.1);  border-color: rgba(255,215,0,0.35); }
.kk-badge-item.locked { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.11); }
.kk-badge-lock-icon { position: absolute; top: 5px; right: 6px; font-size: 9px; opacity: 0.5; }
.kk-badge-emoji     { font-size: 28px; line-height: 1; }
.kk-badge-emoji.gray{ filter: grayscale(1); opacity: 0.45; }
.kk-badge-name      { font-size: 9.5px; font-weight: 800; line-height: 1.3; }
.kk-badge-name.earned { color: var(--kk-c-xp); }
.kk-badge-name.locked { color: rgba(255,255,255,0.4); }
.kk-badge-status    { font-size: 9px; font-weight: 700; }
.kk-badge-status.earned { color: rgba(255,215,0,0.5); }
.kk-badge-status.locked { color: rgba(255,255,255,0.2); }
