/* 월별 총운 */
.unjae-section > nav.unjae-fields > button:nth-child(1),
:is(.relationship-grid, .compat-score-tabs, .wealth-options) > :nth-child(1) { --top: #ddfaf1; --bottom: #b3ebd9; --edge: #7dbca8; --ink: #174d3e; }
/* 재물운 */
.unjae-section > nav.unjae-fields > button:nth-child(2),
.unjae-section > div.unjae-fields > button:nth-child(1),
:is(.relationship-grid, .compat-score-tabs, .wealth-options) > :nth-child(2) { --top: #fff5ce; --bottom: #ffe2a0; --edge: #cfad63; --ink: #614313; }
/* 애정운 */
.unjae-section > nav.unjae-fields > button:nth-child(3),
.unjae-section > div.unjae-fields > button:nth-child(2),
:is(.relationship-grid, .compat-score-tabs, .wealth-options) > :nth-child(3) { --top: #ffe9ef; --bottom: #fbc9dd; --edge: #d899af; --ink: #68314c; }
/* 사업운 */
.unjae-section > nav.unjae-fields > button:nth-child(4),
.unjae-section > div.unjae-fields > button:nth-child(3),
:is(.relationship-grid, .compat-score-tabs, .wealth-options) > :nth-child(4) { --top: #e5f4ff; --bottom: #c4e4fa; --edge: #92b9d8; --ink: #234b66; }
/* 학업운 */
.unjae-section > nav.unjae-fields > button:nth-child(5),
.unjae-section > div.unjae-fields > button:nth-child(4),
:is(.relationship-grid, .compat-score-tabs, .wealth-options) > :nth-child(5) { --top: #f3ebff; --bottom: #dfcef8; --edge: #b89bcf; --ink: #52366a; }
/* 대인운 */
.unjae-section > nav.unjae-fields > button:nth-child(6),
.unjae-section > div.unjae-fields > button:nth-child(5),
:is(.relationship-grid, .compat-score-tabs, .wealth-options) > :nth-child(6) { --top: #ffecde; --bottom: #ffd1b3; --edge: #d8a181; --ink: #6a3b24; }
/* 건강운 */
.unjae-section > nav.unjae-fields > button:nth-child(7),
.unjae-section > div.unjae-fields > button:nth-child(6) { --top: #edf8d9; --bottom: #d6edb6; --edge: #a7c48b; --ink: #395323; }
/* 궁금증 */
.unjae-section > nav.unjae-fields > button:nth-child(8) { --top: #ecedff; --bottom: #d1d8fb; --edge: #a4add7; --ink: #354574; }
/* 다음 해 */
.unjae-section > nav.unjae-fields > button:nth-child(9) { --top: #daf7fa; --bottom: #b8eaf0; --edge: #83bcc4; --ink: #1e5360; }
:is(.unjae-section > .unjae-fields > button, #context-step .relationship-grid button, .compat-score-tabs > button, .wealth-options > label) {
  min-width: 0;
  min-height: 3rem;

  border: 1px solid var(--edge);

  background: linear-gradient(170deg, var(--top), var(--bottom));
  color: var(--ink);
  box-shadow: inset 0 1px 0 #ffffff99, 0 2px 0 var(--edge), 0 4px 7px #443c2626;
  font: 650 1rem/1.35 system-ui, sans-serif;
  letter-spacing: 0;
  word-break: keep-all;
  transition: transform .15s ease-out, box-shadow .15s ease-out;
}
@media (any-hover: hover) and (any-pointer: fine) {
  :is(.unjae-section > .unjae-fields > button, #context-step .relationship-grid button, .compat-score-tabs > button, .wealth-options > label):hover {
    transform: translateY(-5px) scale(1.05);
    position: relative;
    z-index: 1;
    border-color: var(--edge);
    box-shadow: inset 0 1px 0 #ffffffbd, 0 3px 0 var(--edge), 0 9px 13px -3px #313e3059;
  }
  /* Keep the lower edge clickable while the button is lifted. */
  .unjae-section > .unjae-fields > button:hover::after {
    content: "";
    position: absolute;
    inset: 100% 0 auto;
    height: 5px;
  }
}
:is(.unjae-section > .unjae-fields > button, #context-step .relationship-grid button, .compat-score-tabs > button, .wealth-options > label):active {
  transform: translateY(1px) scale(.99);
  box-shadow: inset 0 1px 3px #15221e55, 0 1px 0 var(--edge);
}
:is(.unjae-section > .unjae-fields > button, #context-step .relationship-grid button, .compat-score-tabs > button, .wealth-options > label).touch-lift {
  position: relative;
  z-index: 1;
  transform: translateY(-5px) scale(1.05);
  border-color: var(--ink);
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 var(--edge), 0 9px 13px -3px #313e3066;
  transition: transform .1s ease-out, box-shadow .1s ease-out;
}
:is(.unjae-section > .unjae-fields > button, #context-step .relationship-grid button, .compat-score-tabs > button, .wealth-options > label):focus-visible {
  outline: 3px solid #315548;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  :is(.unjae-section > .unjae-fields > button, #context-step .relationship-grid button, .compat-score-tabs > button, .wealth-options > label):is(:hover, :active, .touch-lift),
  :is(.unjae-section > .unjae-fields > button, #context-step .relationship-grid button, .compat-score-tabs > button, .wealth-options > label) {
    transform: none;
    transition: none;
  }
}

.unjae-section > .unjae-fields {gap:.65rem}
.unjae-section > .unjae-fields > button {padding:.55rem .25rem;border-radius:.65rem}
:is(.unjae-section > .unjae-fields > button, #context-step .relationship-grid button, .compat-score-tabs > button, .wealth-options > label):is([aria-pressed=true], [aria-selected=true], :has(input:checked)) {
  border-color:var(--ink);
  outline:2px solid var(--ink);
  outline-offset:-3px;
}
.unjae-section > div.unjae-fields > button[aria-pressed=true]::before,
.wealth-options label:has(input:checked) > span::before {content:'✓';margin-inline-end:.2em}
:is(.unjae-section > .unjae-fields > button, #context-step .relationship-grid button, .compat-score-tabs > button, .wealth-options > label):focus-visible, .wealth-options > label:has(input:focus-visible) {
  outline:3px solid #315548;outline-offset:2px;
}
@media (max-width:360px) {
  .unjae-section > div.unjae-fields {grid-template-columns:repeat(2,minmax(0,1fr))}
}
