/* On-screen keyboard styles (shared by clock_twins pages).
   Override colors per page via CSS variables:
     --osk-primary, --osk-primary-dark, --osk-active-bg, --osk-text */
.osk {
  margin-top: 8px;
  background: #F2F4F7;
  border-radius: 16px;
  padding: 10px;
  user-select: none;
  position: relative;
}
.osk-dismiss {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  color: #444;
  border: none;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease, color 0.2s ease;
}
.osk-dismiss:hover { background: rgba(0,0,0,0.28); color: #111; }
.osk-dismiss:active { transform: scale(0.94); }
.osk-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.osk-row:last-child { margin-bottom: 0; }
.osk-key {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  padding: 0;
  font-size: 24px;
  font-weight: 700;
  background: white;
  color: var(--osk-text, #2D2D2D);
  border: 1px solid #CCC;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 0 #BBB;
  font-family: inherit;
}
.osk-key:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #BBB;
  background: var(--osk-active-bg, #FFE7EE);
}
.osk-key.wide   { flex: 1.7; font-size: 16px; }
/* Shift는 wide의 절반 크기로 — ㅋ의 시작 위치가 자연스럽게 정렬됨 */
.osk-key.shift  { flex: 0.85; font-size: 16px; }
.osk-key.action {
  background: var(--osk-primary, #FF6F91);
  color: #fff;
  border-color: var(--osk-primary-dark, #C2185B);
  font-size: 18px;
}
.osk-key.action:active { background: var(--osk-primary-dark, #C2185B); }
@media (max-width: 460px) {
  .osk { padding: 8px; }
  .osk-key { min-height: 44px; font-size: 18px; }
  .osk-key.wide   { font-size: 13px; }
  .osk-key.shift  { font-size: 13px; }
  .osk-key.action { font-size: 14px; }
}
.osk[hidden] { display: none !important; }

/* 검색바 옆 ⌨️ 토글 버튼 (시계 도감 검색바 전용 헬퍼) */
.dex-osk-toggle {
  border: 2px solid var(--osk-primary-dark, #C2185B);
  background: var(--osk-primary, #FF6F91);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
}
.dex-osk-toggle:hover { filter: brightness(1.05); }
.dex-osk-toggle.active { transform: scale(0.94); box-shadow: inset 0 2px 6px rgba(0,0,0,0.25); }
