/* 罗盘录入 */

.tjp-compass-overlay {
  position: fixed;
  inset: 0;
  z-index: 15000;
  background: rgba(4, 6, 14, 0.94);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
  padding: 0.2rem;
}

.tjp-compass-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.tjp-compass {
  position: relative;
  width: 100%;
  max-width: 3.75rem;
  padding: 0.2rem 0.16rem 0.18rem;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(30, 38, 62, 0.95) 0%, rgba(10, 14, 26, 0.98) 65%);
  border: 2px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.15), inset 0 0 30px rgba(94, 196, 182, 0.06);
}

.tjp-compass__ring {
  position: absolute;
  inset: -0.08rem;
  pointer-events: none;
}

.tjp-compass__ring span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(212, 175, 55, 0.2);
  animation: tjp-compass-spin 20s linear infinite;
}

.tjp-compass__ring span:nth-child(2) {
  inset: 0.06rem;
  animation-duration: 14s;
  animation-direction: reverse;
}

.tjp-compass__ring span:nth-child(3) {
  inset: 0.12rem;
  border-style: solid;
  border-color: rgba(94, 196, 182, 0.15);
  animation-duration: 8s;
}

@keyframes tjp-compass-spin {
  to { transform: rotate(360deg); }
}

.tjp-compass__close {
  position: absolute;
  top: 0.12rem;
  right: 0.12rem;
  width: 0.28rem;
  height: 0.28rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(232, 220, 200, 0.6);
  font-size: 0.18rem;
  cursor: pointer;
  z-index: 2;
}

.tjp-compass__head {
  text-align: center;
  font-family: "Songti SC", "STSong", serif;
  font-size: 0.16rem;
  color: #f5e6a8;
  letter-spacing: 0.08rem;
  margin-bottom: 0.12rem;
}

.tjp-compass__name {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 0.38rem;
  margin-bottom: 0.1rem;
  padding: 0 0.12rem;
  border-radius: 0.06rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(0, 0, 0, 0.25);
  color: #f5e6a8;
  font-size: 0.14rem;
  text-align: center;
}

.tjp-compass__name::placeholder {
  color: rgba(232, 220, 200, 0.35);
}

.tjp-compass__sex,
.tjp-compass__cal {
  display: flex;
  gap: 0.08rem;
  margin-bottom: 0.1rem;
}

.tjp-compass__sex button,
.tjp-compass__cal button {
  flex: 1;
  height: 0.32rem;
  border-radius: 0.16rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(232, 220, 200, 0.55);
  font-size: 0.12rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  box-shadow: none;
}

.tjp-compass__sex button:focus,
.tjp-compass__cal button:focus,
.tjp-compass__sex button:focus-visible,
.tjp-compass__cal button:focus-visible,
.tjp-compass__sex button:active,
.tjp-compass__cal button:active {
  outline: none;
  box-shadow: none;
}

.tjp-compass__close,
.tjp-compass__submit,
.tjp-compass__name {
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.tjp-compass__close:focus,
.tjp-compass__submit:focus,
.tjp-compass__name:focus,
.tjp-compass__close:focus-visible,
.tjp-compass__submit:focus-visible,
.tjp-compass__name:focus-visible,
.tjp-compass__close:active,
.tjp-compass__submit:active {
  outline: none;
  box-shadow: none;
}

.tjp-compass__sex button.is-on,
.tjp-compass__cal button.is-on {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.15);
  color: #f5e6a8;
}

.tjp-compass--birth-only .tjp-compass__name,
.tjp-compass--birth-only .tjp-compass__sex {
  display: none;
}

.tjp-compass__wheels {
  display: flex;
  position: relative;
  height: 1.62rem;
  margin: 0.08rem 0;
  border-radius: 0.08rem;
  background: rgba(0, 0, 0, 0.2);
}

.tjp-compass__col {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.tjp-compass__col > span {
  display: block;
  text-align: center;
  font-size: 0.09rem;
  color: rgba(212, 175, 55, 0.55);
  padding-top: 0.04rem;
  flex-shrink: 0;
}

.tjp-compass-wheel {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  list-style: none;
  margin: 0;
  padding: 0;
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}

.tjp-compass-wheel::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 50%;
  height: 44px;
  margin-top: -22px;
  border-top: 1px solid rgba(212, 175, 55, 0.35);
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  pointer-events: none;
  z-index: 1;
}

.tjp-compass-wheel::-webkit-scrollbar { display: none; }

.tjp-compass-wheel li {
  height: 44px;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  scroll-snap-align: center;
  font-size: 0.12rem;
  color: rgba(232, 220, 200, 0.38);
  transition: color 0.15s, font-size 0.15s;
}

.tjp-compass-wheel li .tjp-cw-main {
  display: block;
  font-family: "Songti SC", "STSong", serif;
  font-size: 0.13rem;
}

.tjp-compass-wheel li .tjp-cw-sub {
  display: block;
  font-size: 0.08rem;
  color: rgba(94, 196, 182, 0.65);
  margin-top: 1px;
  font-family: monospace, sans-serif;
  letter-spacing: -0.5px;
}

.tjp-compass-wheel li.is-active .tjp-cw-sub {
  color: rgba(94, 196, 182, 0.95);
}

.tjp-compass-wheel li.is-active {
  color: #f5e6a8;
  font-weight: 700;
  font-size: 0.14rem;
}

.tjp-compass-wheel li.is-active .tjp-cw-main {
  font-size: 0.14rem;
}

.tjp-compass-wheel li.is-spacer { display: none; }

.tjp-compass__preview {
  text-align: center;
  font-size: 0.1rem;
  color: rgba(94, 196, 182, 0.85);
  line-height: 1.45;
  min-height: 0.28rem;
  margin-bottom: 0.1rem;
}

.tjp-compass__submit {
  width: 100%;
  height: 0.42rem;
  border: none;
  border-radius: 0.21rem;
  background: linear-gradient(135deg, #c9a227, #f5e6a8);
  color: #1a1035;
  font-size: 0.15rem;
  font-weight: 700;
  font-family: "Songti SC", "STSong", serif;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

body.tjp-cosmos--mobile .tjp-compass-overlay {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(4, 6, 14, 0.96);
}
