/* theme-fix.css - load LAST (after admin.css).
   1) Key letters readable on the white keys
   2) Hand popup: hands get a real size, fingertip letters are shown as small chips above each finger */

/* ---------- 1. Keyboard letters ---------- */
:root:not([data-theme="dark"]) .kb .k { color: #1e293b; }
:root:not([data-theme="dark"]) .kb .k:not(.next) .e { color: #64748b; }
:root:not([data-theme="dark"]) .kb .k .s { color: #059669; }
:root:not([data-theme="dark"]) .k.wide,
:root:not([data-theme="dark"]) .k.sp { color: #475569; }

/* ---------- 2. Hand popup ---------- */
#custom-intro-popup .cip-box { padding: 20px 22px 26px; }
#custom-intro-popup .cip-hands {
  width: min(600px, 88vw);
  padding-top: 170px;      /* room for the letter stacks above the fingers */
  padding-bottom: 6px;
}
/* the hands had no height here, so they collapsed - give them one */
#cip-h { height: min(280px, 41vw); width: auto; }
#cip-h .hfill { background: #223056; }
#cip-h .hink  { background: #e8eefc; }

/* letters above each finger, as small chips */
#custom-intro-popup .cip-f {
  max-height: calc(5 * 2em);
  column-gap: 5px;
  z-index: 2;
  font: 700 clamp(13px, 3vw, 17px)/1.4 var(--pf);
  color: #ffffff;
}
#custom-intro-popup .cip-f span {
  display: block;
  min-width: 1.7em;
  text-align: center;
  padding: 0 7px;
  margin: 1px 0;
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.22);
  border: 1px solid rgba(103, 232, 249, 0.7);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* ---------- 3. Popup heading, finger-coloured chips, hint line ---------- */
#custom-intro-popup .cip-box { text-align: center; max-height: 96vh; overflow: auto; }
#custom-intro-popup .cip-head { padding: 0 44px; }
#custom-intro-popup .cip-kicker {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(103, 232, 249, 0.4);
}
#custom-intro-popup .cip-head h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 4.4vw, 30px);
  font-weight: 800;
  letter-spacing: -.4px;
  text-transform: none;
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(34, 211, 238, 0.45);
}
#custom-intro-popup .cip-head p {
  margin: 0 auto;
  max-width: 480px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--mute);
}
#custom-intro-popup .cip-hands { padding-top: 150px; margin: 0 auto; }
#cip-h { height: min(260px, 41vw, 32vh); }

#custom-intro-popup .cip-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
#custom-intro-popup .cip-tip { font-size: 13px; color: var(--mute); }
#custom-intro-popup .cip-go {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #052e2b;
  background: linear-gradient(135deg, #5eead4, #22d3ee);
  box-shadow: 0 6px 18px rgba(34, 211, 238, 0.4);
  animation: cip-pulse 1.8s ease-in-out infinite;
}
@keyframes cip-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 18px rgba(34, 211, 238, 0.35); }
  50% { transform: scale(1.04); box-shadow: 0 8px 26px rgba(34, 211, 238, 0.65); }
}

/* chips take the colour of their finger */
#custom-intro-popup .cf0 span { background: rgba(248,113,113,.25); border-color: #f87171; }
#custom-intro-popup .cf1 span { background: rgba(251,146,60,.25);  border-color: #fb923c; }
#custom-intro-popup .cf2 span { background: rgba(250,204,21,.22);  border-color: #facc15; }
#custom-intro-popup .cf3 span { background: rgba(52,211,153,.25);  border-color: #34d399; }
#custom-intro-popup .cf4 span { background: rgba(96,165,250,.25);  border-color: #60a5fa; }
#custom-intro-popup .cf5 span { background: rgba(167,139,250,.28); border-color: #a78bfa; }
#custom-intro-popup .cf6 span { background: rgba(244,114,182,.25); border-color: #f472b6; }
#custom-intro-popup .cf7 span { background: rgba(163,196,90,.25);  border-color: #a3c45a; }