/* Cari Kata IPAS: kisi huruf (seret untuk memilih) dan daftar kata atau petunjuk */
.ck-body { position: relative; flex: 1; min-height: 0; display: flex; gap: clamp(8px, 1.6vw, 22px); padding: clamp(8px, 1.4vw, 18px); background: linear-gradient(135deg, var(--sky-50), var(--amber-100) 85%); }
.ck-main { flex: 1 1 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.ck-info { flex: 0 0 auto; background: #fff; border: 3px solid var(--sky); border-radius: 14px; padding: 6px 12px; font-weight: 700; color: var(--ink); font-size: clamp(12px, 1.4vw, 19px); line-height: 1.25; min-height: 2.6em; display: flex; align-items: center; }
.ck-gridwrap { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ck-grid { display: grid; gap: 2px; padding: 4px; background: #fff; border: 3px solid var(--sky-d); border-radius: 14px; touch-action: none; user-select: none; -webkit-user-select: none; }
.cc { display: flex; align-items: center; justify-content: center; border-radius: 6px; font-weight: 800; color: var(--ink); font-size: calc(var(--cs, 40px) * .56); line-height: 1; cursor: pointer; background: #f8fafc; }
.cc.sel { background: var(--amber); color: var(--ink); }
.cc.bad { background: var(--rose-100); color: var(--bad); }
.cc.hint { box-shadow: inset 0 0 0 3px var(--violet); animation: ck-pulse .8s ease-in-out infinite; }
.cc.f { color: #fff; }
.cc.c0 { background: #e11d48; } .cc.c1 { background: #0284c7; } .cc.c2 { background: #059669; } .cc.c3 { background: #7c3aed; }
.cc.c4 { background: #e86a00; } .cc.c5 { background: #0891b2; } .cc.c6 { background: #be185d; } .cc.c7 { background: #4d7c0f; }
@keyframes ck-pulse { 50% { transform: scale(1.12); } }

.ck-side { flex: 0 0 clamp(240px, 34%, 460px); min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.ck-tools { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ck-time, .ck-count { font-weight: 800; font-variant-numeric: tabular-nums; background: #fff; border: 3px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: clamp(13px, 1.5vw, 20px); }
.ck-btn { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--sky); color: #fff; font: inherit; font-weight: 800; font-size: clamp(12px, 1.3vw, 17px); cursor: pointer; box-shadow: 0 3px 0 var(--sky-d); }
.ck-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sky-d); }
.ck-h { margin: 0; font-size: clamp(13px, 1.4vw, 18px); color: var(--sky-d); }
.ck-list { flex: 1 1 0; min-height: 0; margin: 0; padding: 6px; list-style: none; overflow-y: auto; background: #fff; border: 2px solid var(--line); border-radius: 12px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; -webkit-overflow-scrolling: touch; }
.ck-list li { padding: 4px 10px; border-radius: 999px; background: var(--sky-100); color: var(--ink); font-weight: 800; font-size: clamp(12px, 1.35vw, 18px); line-height: 1.25; }
.ck-list li.found { color: #fff; text-decoration: line-through; text-decoration-color: rgba(255,255,255,.8); }
.ck-list li.c0 { background: #e11d48; } .ck-list li.c1 { background: #0284c7; } .ck-list li.c2 { background: #059669; } .ck-list li.c3 { background: #7c3aed; }
.ck-list li.c4 { background: #e86a00; } .ck-list li.c5 { background: #0891b2; } .ck-list li.c6 { background: #be185d; } .ck-list li.c7 { background: #4d7c0f; }

.ck-toast { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 8px 18px; border-radius: 999px; font-weight: 800; font-size: clamp(13px, 1.5vw, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 5; max-width: 90%; text-align: center; }
.ck-toast.show { opacity: 1; transform: translate(-50%, 0); }

.pk-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pk { position: relative; min-height: 48px; border: 3px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px; }
.pk .no { font-weight: 800; font-size: 1.1em; }
.pk .tt { font-size: .7em; color: var(--muted); }
.pk .ok { position: absolute; top: 1px; right: 4px; color: var(--ok); font-weight: 800; font-size: .8em; }
.pk[aria-pressed="true"] { border-color: var(--sky); background: var(--sky-100); }
.pk.done { border-color: var(--emerald); }
.hint-txt, small.hint { font-weight: 600; color: var(--muted); }

@media (max-width: 700px) and (orientation: portrait) {
  .ck-body { flex-direction: column; overflow-y: auto; }
  .ck-main { flex: 0 0 auto; }
  .ck-gridwrap { flex: 0 0 auto; height: min(94vw, 56vh); }
  .ck-side { flex: 0 0 auto; }
  .ck-list { flex: 0 0 auto; max-height: 200px; }
}
@media (max-height: 520px) {
  .ck-body { padding: 6px 10px; gap: 8px; }
  .ck-main { gap: 4px; }
  .ck-info { padding: 2px 10px; border-width: 2px; min-height: 2.4em; font-size: 12px; }
  .ck-side { gap: 4px; }
  .ck-btn { min-height: 32px; padding: 0 10px; box-shadow: 0 2px 0 var(--sky-d); }
  .ck-grid { padding: 3px; border-width: 2px; }
}
@media (prefers-reduced-motion: reduce) { .ck-toast { transition: none; } .cc.hint { animation: none; } }
