.gh-pinyin-floating {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2147483647;
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 14px;
  border-radius: 14px;
  background: #7acbdc;
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
  text-align: center;
}

.gh-pinyin-floating.is-hidden {
  display: none !important;
}

.gh-pinyin-floating__title {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
}

.gh-pinyin-floating__hint {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.gh-pinyin-floating__keys {
  display: grid;
  grid-template-columns: repeat(4, 50px);
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.gh-pinyin-floating__key {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  max-width: 50px;
  max-height: 50px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
}

.gh-pinyin-floating__key:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.14);
}

.gh-pinyin-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483646;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(12px);
}

.gh-pinyin-toggle__label {
  font-size: 13px;
  font-weight: 800;
}

.gh-pinyin-toggle__switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 53px;
  height: 24px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease;
  user-select: none;
}

.gh-pinyin-toggle__switch:focus-visible {
  outline: 2px solid #4fc3f7;
  outline-offset: 2px;
}

/* OFF 状态：马卡龙草莓粉 */
.gh-pinyin-toggle__switch.is-off {
  background: linear-gradient(#f3a5a8, #e2748a);
}

/* ON 状态：马卡龙薄荷绿 */
.gh-pinyin-toggle__switch.is-on {
  background: linear-gradient(#7fd8a4, #4cbc8a);
}

.gh-pinyin-toggle__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(#ffffff, #eef1ef);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: left 0.25s ease, transform 0.25s ease;
}

.gh-pinyin-toggle__switch.is-on .gh-pinyin-toggle__knob {
  left: calc(100% - 22px);
}

.gh-pinyin-toggle__text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.gh-pinyin-toggle__switch.is-off .gh-pinyin-toggle__text {
  right: 7px;
}

.gh-pinyin-toggle__switch.is-on .gh-pinyin-toggle__text {
  left: 7px;
}
