@font-face {
  font-family: Pretendard;
  src: url('./fonts/PretendardVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

.uf-document {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 93% 6%, #302251 0, transparent 43%), #100d1e;
  color: #f8f3fd;
}

.uf-shell {
  --uf-muted: #cfc3df;
  --uf-accent: #e8caf8;
  --uf-border: #59466f;
  max-width: 70rem;
  margin-inline: auto;
  padding: 0 clamp(1rem, 4vw, 3rem) 4rem;
  font: 1rem/1.6 Pretendard, system-ui, 'Malgun Gothic', sans-serif;
}

.uf-shell *, .uf-shell *::before, .uf-shell *::after { box-sizing: border-box; }
.uf-shell h1, .uf-shell h2, .uf-shell p { margin: 0; }
.uf-shell h1, .uf-shell h2, .uf-shell h3 { color: inherit; font-family: inherit; font-weight: 760; }
.uf-shell [hidden] { display: none; }
.uf-shell a { color: inherit; }
.uf-shell a:focus-visible, .uf-shell input:focus-visible + span { outline: 2px solid #ffe5a7; outline-offset: 3px; }
.uf-nav { min-height: 4.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--uf-border); }
.uf-nav a { text-decoration: none; }
.uf-nav a:hover { text-decoration: underline; }
.uf-brand { color: var(--uf-accent); font-weight: 700; letter-spacing: .02em; }
.uf-heading { padding-block: clamp(2rem, 6vw, 4rem) 2rem; }
.uf-shell h1 { font-size: clamp(2.4rem, 8vw, 5rem); line-height: 1.12; letter-spacing: -.06em; }
.uf-heading p { margin-top: .9rem; color: var(--uf-muted); }
.uf-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.uf-panel { border: 1px solid var(--uf-border); border-radius: 1.25rem; background: #1e172d; padding: clamp(1rem, 3vw, 1.75rem); min-width: 0; }
.uf-controls { margin: 0; }
.uf-controls fieldset { min-inline-size: 0; padding: 0; margin: 0; border: 0; }
.uf-controls fieldset + fieldset { margin-top: 1.2rem; }
.uf-controls legend { padding: 0; margin-bottom: .55rem; font-weight: 650; }
.uf-options { display: grid; gap: .5rem; }
.uf-periods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.uf-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.uf-signs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.uf-options label { position: relative; display: flex; cursor: pointer; }
.uf-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.uf-options span { display: grid; align-items: center; flex: 1; min-height: 2.75rem; border: 1px solid var(--uf-border); border-radius: .65rem; padding: .35rem .15rem; text-align: center; font-size: .95rem; word-break: keep-all; overflow-wrap: anywhere; }
.uf-options label:hover span { border-color: var(--uf-accent); }
.uf-options input:checked + span { background: var(--uf-accent); color: #291338; border-color: var(--uf-accent); font-weight: 700; }
.uf-signs label > span { justify-items: center; align-content: center; gap: .15rem; padding: .35rem .2rem; }
.uf-signs img, .uf-result-art img { display: block; image-rendering: pixelated; object-fit: contain; }
.uf-result-art { display: grid; place-items: center; margin-bottom: .9rem; border-radius: .85rem; padding: .7rem; background: radial-gradient(ellipse at 50% 65%, #614075, #251a39 68%); }
.uf-result { background: linear-gradient(150deg, #342348, #21172f 64%); }
.uf-result .uf-date { color: #f1d7a5; font-size: .9rem; }
.uf-result h2 { margin-top: .55rem; font-size: clamp(1.35rem, 4vw, 2rem); word-break: keep-all; }
.uf-result [data-result-text] { margin-top: .8rem; color: var(--uf-muted); }
.uf-reading-details section { margin-top: 1.25rem; padding-top: 1.05rem; border-top: 1px solid var(--uf-border); }
.uf-reading-details h3 { margin: 0 0 .7rem; font-size: 1.06rem; }
.uf-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: 0; }
.uf-topics div { padding: .65rem .75rem; border: 1px solid var(--uf-border); border-radius: .65rem; background: #20172d; }
.uf-topics dt, .uf-birth-answer h4 { color: #f1d7a5; font-weight: 700; }
.uf-topics dd, .uf-birth-answer p { margin: .2rem 0 0; color: var(--uf-muted); font-size: .95rem; word-break: keep-all; overflow-wrap: anywhere; }
.uf-birth-reading label { display: block; margin-bottom: .25rem; font-size: .9rem; color: var(--uf-muted); }
.uf-birth-reading select {
  width: min(100%, 17rem); min-height: 44px; padding: .35rem .65rem;
  border: 1px solid var(--uf-border); border-radius: .6rem; background: #20172d;
  color: inherit; color-scheme: dark; font: inherit;
}
.uf-birth-reading select:focus-visible { outline: 2px solid #ffe5a7; outline-offset: 3px; }
.uf-birth-reading .uf-birth-basis { margin-top: .3rem; color: var(--uf-muted); font-size: .85rem; }
.uf-birth-answer h4 { margin: .8rem 0 .2rem; font-size: .95rem; }

@media (max-width: 45rem) {
  .uf-layout { grid-template-columns: minmax(0, 1fr); }
  .uf-topics { grid-template-columns: 1fr; }
}

@media (forced-colors: active) {
  .uf-options input:checked + span { outline: 2px solid Highlight; outline-offset: -3px; }
}
