@charset "utf-8";
/**
 * plus/fortune 방향 추천 나침반
 * 바늘은 dial 전체(inset:0) 레이어 — 0×0 박스에서는 transform이 무시되는 브라우저 이슈 회피
 */

.wr-compass {
  display: block;
  width: min(100%, 260px);
  margin: 12px auto 4px;
  text-align: center;
  color: var(--text-primary);
}

.wr-compass[hidden] {
  display: none !important;
}

.wr-compass__dial {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 50%;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 50% 50%, var(--bg-secondary) 0%, var(--bg-tertiary) 62%, var(--bg-secondary) 100%);
  border: 2px solid var(--border-color);
  overflow: hidden;
}

.wr-compass__grid {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--border-color) 80%, transparent);
  background:
    linear-gradient(to right, color-mix(in srgb, var(--border-color) 55%, transparent) 1px, transparent 1px) center/100% 100%,
    linear-gradient(to bottom, color-mix(in srgb, var(--border-color) 55%, transparent) 1px, transparent 1px) center/100% 100%;
  opacity: 0.55;
  pointer-events: none;
}

.wr-compass__mark {
  position: absolute;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  line-height: 1;
}

.wr-compass__mark--n { top: 10px; left: 50%; transform: translateX(-50%); color: var(--theme-green-deep, #5a6b4a); }
.wr-compass__mark--s { bottom: 10px; left: 50%; transform: translateX(-50%); }
.wr-compass__mark--e { right: 12px; top: 50%; transform: translateY(-50%); }
.wr-compass__mark--w { left: 12px; top: 50%; transform: translateY(-50%); }

.wr-compass__hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--text-secondary);
  z-index: 5;
  pointer-events: none;
}

/* 바늘: dial과 동일 크기 레이어 → transform-origin 중앙이 안정적으로 동작 */
.wr-compass__needle {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}

.wr-compass__needle.is-hidden {
  visibility: hidden;
  opacity: 0;
}

/* 중심에서 위(北)로 뻗는 샤프트 */
.wr-compass__shaft {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 3px;
  height: 36%;
  margin-left: -1.5px;
  border-radius: 2px 2px 0 0;
  background: currentColor;
}

.wr-compass__tip {
  position: absolute;
  left: 50%;
  bottom: calc(50% + 36% - 2px);
  width: 0;
  height: 0;
  margin-left: -6px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 14px solid currentColor;
}

.wr-compass__badge {
  position: absolute;
  left: 50%;
  bottom: calc(50% + 36% + 14px);
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-sizing: border-box;
}

.wr-compass__needle--1 {
  color: var(--theme-green-deep, #5a6b4a);
  z-index: 4;
}
.wr-compass__needle--1 .wr-compass__badge {
  background: var(--theme-green-deep, #5a6b4a);
  color: #fff;
}

.wr-compass__needle--2 {
  color: var(--theme-ochre, #b8a06a);
  z-index: 3;
}
.wr-compass__needle--2 .wr-compass__shaft {
  width: 2px;
  height: 28%;
  margin-left: -1px;
  opacity: 0.95;
}
.wr-compass__needle--2 .wr-compass__tip {
  bottom: calc(50% + 28% - 2px);
  margin-left: -5px;
  border-left-width: 5px;
  border-right-width: 5px;
  border-bottom-width: 12px;
}
.wr-compass__needle--2 .wr-compass__badge {
  bottom: calc(50% + 28% + 12px);
  background: var(--theme-ochre, #b8a06a);
  color: #1a1a16;
}

.wr-compass__center-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 2px solid var(--theme-green, #8fad6a);
  background: color-mix(in srgb, var(--theme-green, #8fad6a) 28%, var(--bg-primary));
  z-index: 6;
  box-sizing: border-box;
  pointer-events: none;
}
.wr-compass__center-pin::after {
  content: "中";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--theme-green-deep, #5a6b4a);
  line-height: 1;
}

.wr-compass__legend {
  margin-top: 10px;
  font-size: 0.9em;
  color: var(--text-primary);
  line-height: 1.4;
}

.wr-compass__leg-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wr-compass__leg-sep {
  margin: 0 6px;
  color: var(--text-secondary);
}

.wr-compass__leg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.wr-compass__leg-badge--1 {
  background: var(--theme-green-deep, #5a6b4a);
  color: #fff;
}
.wr-compass__leg-badge--2 {
  background: var(--theme-ochre, #b8a06a);
  color: #1a1a16;
}

html[data-theme="dark"] .wr-compass__dial {
  background:
    radial-gradient(circle at 50% 50%, var(--bg-tertiary) 0%, var(--bg-secondary) 70%, var(--bg-primary) 100%);
  border-color: var(--border-color);
}

html[data-theme="dark"] .wr-compass__needle--1 {
  color: var(--theme-green, #5a7a3a);
}
html[data-theme="dark"] .wr-compass__needle--1 .wr-compass__badge,
html[data-theme="dark"] .wr-compass__leg-badge--1 {
  background: var(--theme-green, #5a7a3a);
  color: #e8e8e0;
}

html[data-theme="dark"] .wr-compass__needle--2 {
  color: var(--theme-ochre, #7a6840);
}
html[data-theme="dark"] .wr-compass__needle--2 .wr-compass__badge,
html[data-theme="dark"] .wr-compass__leg-badge--2 {
  background: var(--theme-ochre, #7a6840);
  color: #e8e8e0;
}

html[data-theme="dark"] .wr-compass__center-pin::after {
  color: var(--text-primary);
}

@media (max-width: 400px) {
  .wr-compass__dial {
    width: 196px;
    height: 196px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wr-compass__needle {
    transition: none !important;
  }
}

/* pro 요약 고지 (택일·MBTI·재물/애정) */
.wr-pro-note {
  display: block;
  margin: 12px auto 8px;
  max-width: 520px;
  padding: 12px 14px;
  text-align: left;
  font-size: 0.92em;
  line-height: 1.55;
  color: var(--text-primary);
  border-left: 3px solid var(--theme-green, #8fad6a);
  background: color-mix(in srgb, var(--theme-green, #8fad6a) 12%, var(--bg-secondary, #f5f4ef));
  box-sizing: border-box;
}
.wr-pro-note[hidden] {
  display: none !important;
}
/* 오늘운: 바이오리듬 아래 택일·명리·기문 블록 */
#wrProTodayNote {
  margin-top: 16px;
}
.wr-pro-note strong {
  color: var(--text-primary);
}
.wr-pro-note em {
  font-style: normal;
  font-weight: 700;
  color: var(--text-primary);
}
.wr-pro-note__hint {
  color: var(--text-secondary);
  font-size: 0.88em;
}
.wr-pro-note__head {
  margin-bottom: 8px;
}
.wr-pro-note__zhi {
  margin-left: 4px;
  color: var(--text-secondary);
  font-size: 0.92em;
}
.wr-pro-note__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wr-pro-note__item {
  display: grid;
  grid-template-columns: 7.5em 1fr auto;
  gap: 6px 10px;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid color-mix(in srgb, var(--border-color, #ccc) 55%, transparent);
}
.wr-pro-note__item:first-child {
  border-top: 0;
  padding-top: 2px;
}
.wr-pro-note__label {
  font-weight: 700;
  color: var(--text-primary);
}
.wr-pro-note__phrase {
  font-weight: 600;
  color: var(--text-primary);
}
/* 길·추천 → 푸른색 / 흉·주의 → 빨강 / 평·보통 → 본문색 */
.wr-pro-note__item.is-gil .wr-pro-note__phrase,
.wr-pro-note__tone--gil {
  color: #2563eb;
}
.wr-pro-note__item.is-hyung .wr-pro-note__phrase,
.wr-pro-note__tone--hyung {
  color: var(--color-red, #e11d48);
}
.wr-pro-note__item.is-pyung .wr-pro-note__phrase {
  color: var(--text-primary);
}
.wr-pro-note__meta {
  font-size: 0.82em;
  color: var(--text-secondary);
  white-space: nowrap;
}
.wr-pro-note__dirs {
  margin: 8px 0 4px;
  font-size: 0.9em;
  color: var(--text-secondary);
}
.wr-pro-note + .wr-pro-note {
  margin-top: 12px;
}
.wr-pro-note__list--chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.wr-pro-note__list--chips .wr-pro-note__item {
  border: 0;
  padding: 4px 0;
  flex: 0 1 auto;
}
html[data-theme="dark"] .wr-pro-note {
  background: color-mix(in srgb, var(--theme-green, #5a7a3a) 18%, var(--bg-tertiary, #2a2a26));
}
html[data-theme="dark"] .wr-pro-note__item.is-gil .wr-pro-note__phrase,
html[data-theme="dark"] .wr-pro-note__tone--gil {
  color: #60a5fa;
}
html[data-theme="dark"] .wr-pro-note__item.is-hyung .wr-pro-note__phrase,
html[data-theme="dark"] .wr-pro-note__tone--hyung {
  color: #fb7185;
}
@media (max-width: 420px) {
  .wr-pro-note__item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .wr-pro-note__meta {
    white-space: normal;
  }
}
