/* 网站内嵌五笔软键盘（紧凑，保证整键盘可见） */
.wubi-soft-ime {
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(8, 12, 22, 0.96);
  padding: 6px 4px 8px;
  user-select: none;
  -webkit-user-select: none;
}

.wubi-soft-ime__head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 4px;
  padding: 0 4px;
}

.wubi-soft-ime__code {
  min-width: 3.5rem;
  text-align: right;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #7ec8ff;
}

.wubi-soft-ime__cands {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 2.1rem;
  padding: 2px 2px 4px;
  margin-bottom: 2px;
}

.wubi-soft-ime__cand {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f7ff;
  font-weight: 800;
  font-size: 1rem;
  padding: 4px 8px;
  cursor: pointer;
  line-height: 1.15;
}

.wubi-soft-ime__cand:active,
.wubi-soft-ime__cand.is-active {
  border-color: rgba(240, 160, 74, 0.9);
  background: rgba(240, 160, 74, 0.28);
  color: #fff6e8;
}

.wubi-soft-ime__cand-idx {
  display: inline-block;
  margin-right: 3px;
  font-size: 0.65rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.45);
  vertical-align: middle;
}

.wubi-soft-ime__empty {
  color: rgba(233, 238, 255, 0.45);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 2px;
}

.wubi-soft-ime__empty--idle {
  display: block;
  width: 100%;
  min-height: 1.6rem;
  padding: 0;
  border-radius: 6px;
  color: transparent;
  background: rgba(233, 238, 255, 0.45);
  opacity: 0.35;
}

.wubi-soft-ime__rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wubi-soft-ime__row {
  display: flex;
  justify-content: center;
  gap: 3px;
  width: 100%;
}

.wubi-soft-ime__row--mid {
  padding: 0 2.5%;
}

.wubi-soft-ime__row--bottom-letters {
  padding: 0 0.5%;
}

.wubi-soft-ime__row--space {
  margin-top: 1px;
  gap: 4px;
  padding: 0 1%;
}

.wubi-soft-ime__key {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.15rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: linear-gradient(180deg, #2a3550, #1a2236);
  color: #eef3ff;
  font-weight: 900;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.wubi-soft-ime__key:active {
  filter: brightness(1.15);
  transform: translateY(1px);
}

.wubi-soft-ime__key--fn {
  flex: 1.1 1 0;
  max-width: 3.6rem;
  font-size: 0.72rem;
  background: linear-gradient(180deg, #3a455f, #252d42);
}

.wubi-soft-ime__key--space {
  flex: 5.5 1 0;
  max-width: none;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #33405c, #222b40);
}

.wubi-soft-ime__key--muted {
  opacity: 0.45;
}

.wubi-soft-ime__key:disabled {
  cursor: default;
}

.wubi-soft-ime__hint {
  display: none;
}

@media (min-width: 520px) {
  .wubi-soft-ime__key {
    min-height: 2.4rem;
    font-size: 0.95rem;
  }
  .wubi-soft-ime__key--fn {
    max-width: 4.2rem;
  }
}
