/* -------------------------------------------------------------------------- */
/* 雙人星座五步問答                                                           */
/* -------------------------------------------------------------------------- */

.zodiac-form-panel {
  position: relative;
  z-index: 2;
}

.zodiac-flow-head {
  display: grid;
  gap: 8px;
}

.zodiac-flow-meta {
  display: flex;
  align-items: center;
  color: #aeb3bd;
  font-size: 12px;
  font-weight: 850;
}

.zodiac-flow-meta strong {
  color: #8edfff;
  font-size: 14px;
}

.zodiac-flow-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #343741;
}

.zodiac-flow-track i {
  width: 20%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #b99cff, #74d9ff);
  transition: width .24s ease;
}

.zodiac-flow-screen {
  display: grid;
  gap: 7px;
  scroll-margin-top: 18px;
}

.zodiac-flow-question {
  margin: 0;
  color: #fff8f0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.18;
}

.zodiac-flow-hint {
  max-width: 680px;
  margin: 0;
  color: #9ca1ac;
  font-size: 14px;
  line-height: 1.55;
}

.zodiac-flow-options {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.zodiac-flow-options.is-sign-picker {
  width: 100%;
  display: block;
}

.zodiac-flow-options.is-answer-list {
  width: 100%;
}

.zodiac-choice {
  width: 100%;
  min-width: 0;
  border: 1px solid #41444e;
  border-radius: 14px;
  background: #23252d;
  color: #f4efe7;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.zodiac-choice:hover {
  border-color: rgba(116, 217, 255, .54);
  background: #282c35;
  transform: translateY(-1px);
}

.zodiac-choice:focus-visible {
  outline: 3px solid rgba(116, 217, 255, .36);
  outline-offset: 3px;
}

.zodiac-choice.is-selected {
  border-color: #74d9ff;
  background: linear-gradient(145deg, rgba(116, 217, 255, .14), rgba(185, 156, 255, .08)), #252932;
  box-shadow: inset 0 0 0 1px rgba(116, 217, 255, .18), 0 12px 26px rgba(0, 0, 0, .16);
}

.zodiac-sign-select {
  position: relative;
  width: 100%;
}

.zodiac-sign-trigger {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 11px;
  border: 1px solid #484c57;
  border-radius: 14px;
  background: #23252d;
  color: #fff8f0;
  padding: 11px 16px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.zodiac-sign-trigger:hover,
.zodiac-sign-trigger[aria-expanded="true"] {
  border-color: rgba(116, 217, 255, .62);
  background: #282b34;
}

.zodiac-sign-trigger:focus-visible {
  outline: 3px solid rgba(116, 217, 255, .36);
  outline-offset: 3px;
}

.zodiac-sign-trigger-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(116, 217, 255, .18);
  border-radius: 9px;
  background: rgba(116, 217, 255, .07);
  color: #8edfff;
}

.zodiac-sign-trigger-icon .zodiac-symbol {
  width: 23px;
  height: 23px;
}

.zodiac-sign-trigger-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.zodiac-sign-trigger-copy strong {
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
}

.zodiac-sign-trigger-copy small {
  color: #969ba6;
  font-size: 11px;
}

.zodiac-sign-placeholder {
  grid-column: 1 / 3;
  color: #c7cbd3;
  font-size: 14px;
  font-weight: 800;
}

.zodiac-sign-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid #8edfff;
  border-bottom: 2px solid #8edfff;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .16s ease;
}

.zodiac-sign-trigger[aria-expanded="true"] .zodiac-sign-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.zodiac-sign-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: min(340px, 58vh);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  overflow-y: auto;
  border: 1px solid #484c57;
  border-radius: 12px;
  background: #1e2027;
  padding: 8px;
  box-shadow: 0 24px 58px rgba(0, 0, 0, .42);
}

.zodiac-sign-menu-option {
  min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #f4efe7;
  padding: 8px 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.zodiac-sign-menu-option:hover,
.zodiac-sign-menu-option:focus-visible {
  border-color: rgba(116, 217, 255, .3);
  background: rgba(116, 217, 255, .07);
  outline: none;
}

.zodiac-sign-menu-option.is-selected {
  border-color: rgba(116, 217, 255, .48);
  background: rgba(116, 217, 255, .11);
}

.zodiac-sign-menu-option > span {
  display: grid;
  place-items: center;
  color: #8edfff;
}

.zodiac-sign-menu-option .zodiac-symbol {
  width: 21px;
  height: 21px;
}

.zodiac-sign-menu-option strong {
  font-size: 13px;
}

.zodiac-sign-menu-option small {
  color: #8f949e;
  font-size: 10px;
  white-space: nowrap;
}

.zodiac-answer-choice {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
}

.zodiac-answer-copy {
  min-width: 0;
}

.zodiac-answer-copy strong {
  color: #fff8f0;
  font-size: 15px;
}

.zodiac-choice-mark {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid #5a5e68;
  border-radius: 50%;
}

.zodiac-choice.is-selected .zodiac-choice-mark {
  border-color: #74d9ff;
  background: #74d9ff;
  box-shadow: inset 0 0 0 5px #25313a;
}

/* -------------------------------------------------------------------------- */
/* 配對等待                                                                   */
/* -------------------------------------------------------------------------- */

.zodiac-matching {
  display: grid;
  justify-items: center;
  overflow: hidden;
  padding: clamp(32px, 7vw, 56px) 0;
  text-align: center;
}

.zodiac-matching-meter {
  position: relative;
  width: clamp(172px, 30vw, 210px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.zodiac-matching-meter::before,
.zodiac-matching-meter::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.zodiac-matching-meter::before {
  inset: 17%;
  background: radial-gradient(circle, rgba(116, 217, 255, .13), rgba(116, 217, 255, .02) 68%, transparent 70%);
  box-shadow: inset 0 0 28px rgba(116, 217, 255, .1);
}

.zodiac-matching-meter::after {
  inset: -5px;
  border: 1px solid rgba(116, 217, 255, .08);
  box-shadow: 0 0 42px rgba(116, 217, 255, .09);
}

.zodiac-matching-meter svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  transform: rotate(-90deg);
}

.zodiac-matching-track,
.zodiac-matching-ring,
.zodiac-matching-spinner {
  fill: none;
  stroke-linecap: round;
}

.zodiac-matching-track {
  stroke: rgba(255, 255, 255, .09);
  stroke-width: 7;
}

.zodiac-matching-ring {
  stroke: #74d9ff;
  stroke-width: 7;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0 7px rgba(116, 217, 255, .42));
  transition: stroke-dashoffset .5s linear;
}

.zodiac-matching-spinner {
  stroke: rgba(185, 156, 255, .9);
  stroke-width: 2;
  stroke-dasharray: 8 92;
  animation: zodiac-matching-orbit 1.15s linear infinite;
}

.zodiac-matching-value {
  position: absolute;
  z-index: 1;
  display: grid;
  gap: 5px;
}

.zodiac-matching-value strong {
  color: #fff;
  font-size: clamp(36px, 7vw, 50px);
  line-height: 1;
  letter-spacing: -.04em;
}

.zodiac-matching-value span {
  color: #8edfff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.zodiac-matching h2 {
  margin: 26px 0 0;
  color: #fff8f0;
  font-size: clamp(26px, 5vw, 39px);
  line-height: 1.18;
}

.zodiac-matching-message {
  min-height: 26px;
  margin: 14px 0 0;
  color: #b9bec8;
  font-size: 15px;
  line-height: 1.65;
}

.zodiac-matching-stages {
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 26px;
}

.zodiac-matching-stages span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #3d4049;
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: #777c87;
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 850;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.zodiac-matching-stages i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.zodiac-matching-stages .is-active {
  border-color: rgba(116, 217, 255, .36);
  background: rgba(116, 217, 255, .08);
  color: #aeeaff;
}

.zodiac-matching-stages .is-complete {
  border-color: rgba(185, 156, 255, .25);
  color: #bdaaff;
}

@keyframes zodiac-matching-orbit {
  to { stroke-dashoffset: -100; }
}

.zodiac-result-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  color: #bcefff;
}

.zodiac-result-pair span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

.zodiac-result-pair .zodiac-symbol {
  width: 26px;
  height: 26px;
}

.zodiac-result-pair b {
  color: #727783;
  font-size: 15px;
}

@media (max-width: 560px) {
  .zodiac-sign-menu {
    grid-template-columns: 1fr;
    max-height: min(360px, 58vh);
  }

  .zodiac-answer-choice {
    grid-template-columns: minmax(0, 1fr) 20px;
    padding: 11px 13px;
  }

  .zodiac-matching-stages {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zodiac-flow-track i,
  .zodiac-choice,
  .zodiac-matching-ring,
  .zodiac-matching-stages span {
    transition: none;
  }

  .zodiac-matching-spinner {
    animation: none;
  }
}
