@import url('https://fonts.googleapis.com/css2?family=Gowun+Dodum&family=Jua&display=swap');

:root { color-scheme: light; --ink: #302b27; --muted: #82796f; --paper: #fffaf2; --accent: #76638d; --accent-soft: #f0eaf5; --orange: #ed7045; --display: 'Jua', 'Malgun Gothic', sans-serif; --body: 'Gowun Dodum', 'Malgun Gothic', sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(ellipse at 12% 10%, #fff0d7 0, transparent 29rem), radial-gradient(ellipse at 95% 54%, #eee9f4 0, transparent 32rem), var(--paper); color: var(--ink); font-family: var(--body); -webkit-font-smoothing: antialiased; }
button { color: inherit; font: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #347e8d; outline-offset: 4px; }
.skip-link { position: absolute; top: -60px; left: 16px; z-index: 10; padding: 12px 18px; border-radius: 10px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }
.site-header { width: min(1080px, calc(100% - 48px)); height: 72px; margin: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgb(70 50 35 / 9%); }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 22px var(--display); letter-spacing: -.05em; }
.brand-mark { position: relative; display: inline-flex; align-items: flex-end; justify-content: center; gap: 2px; width: 27px; height: 27px; padding: 4px 4px 5px; }
.brand-mark i { display: block; width: 4px; border-radius: 3px 3px 0 0; background: #ffd16c; }
.brand-mark i:nth-child(1) { height: 12px; rotate: -9deg; }.brand-mark i:nth-child(2) { height: 16px; translate: 0 -2px; }.brand-mark i:nth-child(3) { height: 13px; rotate: 8deg; }
.brand-mark b { position: absolute; right: 3px; bottom: 2px; left: 3px; height: 9px; border-radius: 2px 2px 6px 6px; background: var(--orange); }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid rgb(70 50 35 / 10%); border-radius: 99px; background: rgb(255 255 255 / 60%); color: #665c52; font-size: 14px; transition: background .2s, transform .2s; }
.back-link:hover { background: #fff; transform: translateY(-2px); }
.shell { width: min(760px, calc(100% - 40px)); margin: 34px auto 72px; }
.panel { position: relative; overflow: hidden; border: 1px solid rgb(70 50 35 / 7%); border-radius: 30px; background: rgb(255 255 255 / 87%); box-shadow: 0 18px 55px rgb(81 61 41 / 7%); }
.intro { padding: 42px 48px 44px; }
.intro-art { position: absolute; top: 34px; right: 42px; width: 138px; height: 138px; animation: drift 5s ease-in-out infinite; }
.intro-art svg, .result-art svg { display: block; width: 100%; height: 100%; overflow: visible; }
.orbit { fill: none; stroke: #b4a0c6; stroke-width: 1.2; transform-origin: 90px 90px; }.orbit-one { animation: orbit-turn 24s linear infinite; }.orbit-two { stroke: #e9bd88; stroke-dasharray: 3 5; }
.star-dot { fill: #e8a666; }.star-ray { fill: #8e78a1; }.tiny-dot { fill: #e9bd88; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #89766a; font-size: 15px; }
.eyebrow i { width: 9px; height: 9px; border-radius: 50%; background: #ee9b67; box-shadow: 0 0 0 5px #fff0e5; }
h1, h2, h3, p { margin-top: 0; }
.intro h1 { max-width: 420px; margin: 26px 0 11px; font: clamp(48px, 8vw, 66px)/1.11 var(--display); letter-spacing: -.075em; }
.intro h1 em { color: var(--accent); font-style: normal; }
.intro-copy { margin: 0 0 13px; color: #746a61; font-size: 17px; line-height: 1.75; }
.intro-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: #82796f; font-size: 14px; }
.intro-meta i { width: 4px; height: 4px; border-radius: 50%; background: #c1b4a5; }
.fortune-form { margin-top: 31px; padding-top: 26px; border-top: 1px solid #eee6dc; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 8px; color: #524941; font: 16px var(--display); }
.field input { width: 100%; min-width: 0; min-height: 52px; padding: 0 15px; border: 1px solid #e8dfd5; border-radius: 15px; background: #fffdfa; color: var(--ink); font: 16px var(--body); transition: border-color .2s, box-shadow .2s; }
.field input:focus { border-color: #b39dc7; outline: 0; box-shadow: 0 0 0 3px rgb(143 119 162 / 13%); }
.field input::placeholder { color: #a69c92; }
.field small, .field-hint, .level-fieldset-heading small { color: #82796f; font: 14px/1.5 var(--body); }
.channel-field { margin-top: 18px; }
.channel-field > span:first-child { display: flex; align-items: baseline; gap: 9px; }
.channel-field input { max-width: 260px; }
.field-hint { display: block; margin: -1px 0 0; }
.town-fieldset { min-width: 0; margin: 24px 0 0; padding: 0; border: 0; }
.town-fieldset legend, .level-fieldset-heading > span { margin-bottom: 7px; color: #524941; font: 18px var(--display); }
.town-fieldset > .field-hint { margin-bottom: 13px; }
.town-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.town-input-row { min-width: 0; position: relative; }
.town-input-row label { display: flex; flex-direction: column; gap: 7px; color: #786d63; font-size: 14px; }
.town-input-row input { width: 100%; min-width: 0; min-height: 48px; padding: 0 12px; border: 1px solid #e8dfd5; border-radius: 14px; background: #fffdfa; color: var(--ink); font: 15px var(--body); }
.town-input-row input:focus { border-color: #b39dc7; outline: 0; box-shadow: 0 0 0 3px rgb(143 119 162 / 13%); }
.remove-town { position: absolute; top: 29px; right: 5px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: #93877b; font-size: 21px; cursor: pointer; }
.town-input-row.has-remove input { padding-right: 38px; }
.add-town-button { min-height: 42px; margin-top: 12px; padding: 0 14px; border: 1px solid #e8dfd5; border-radius: 13px; background: #fffdfa; color: #62584f; font-size: 14px; cursor: pointer; transition: background .2s, transform .2s; }
.add-town-button:hover:not(:disabled) { transform: translateY(-2px); background: #f8f2fa; }.add-town-button:disabled { opacity: .5; cursor: not-allowed; }
.level-fieldset { margin-top: 25px; padding-top: 21px; border-top: 1px solid #eee6dc; }
.level-fieldset-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.level-grid { display: grid; grid-template-columns: 1fr 38px 1fr; align-items: end; gap: 11px; }
.number-input { display: flex; align-items: center; min-height: 52px; padding: 0 14px; border: 1px solid #e8dfd5; border-radius: 15px; background: #fffdfa; }
.number-input:focus-within { border-color: #b39dc7; box-shadow: 0 0 0 3px rgb(143 119 162 / 13%); }
.number-input input { width: 100%; min-width: 0; min-height: 48px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 19px var(--display); }
.number-input b { color: #82796f; font: 15px var(--body); }
.level-arrow { align-self: center; padding-top: 23px; color: #a89b8e; text-align: center; font-size: 22px; }
.form-error { margin: 17px 0 0; color: #b34939; font-size: 14px; line-height: 1.55; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-width: 193px; min-height: 58px; padding: 0 22px; border: 0; border-radius: 17px; background: var(--ink); color: #fff; font: 19px var(--display); cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.primary-button span { font: 22px var(--body); transition: translate .2s; }
.primary-button:hover { transform: translateY(-3px); background: #483c33; box-shadow: 0 9px 18px rgb(48 43 39 / 16%); }.primary-button:hover span { translate: 4px 0; }
.form-submit { width: 100%; margin-top: 23px; background: var(--accent); }.form-submit:hover { background: #66527e; }
.result { padding: 42px 50px 38px; text-align: center; animation: result-enter .45s ease-out both; }.result > .eyebrow { justify-content: center; }
.result-art { width: 160px; height: 130px; margin: 16px auto 16px; animation: drift 4s ease-in-out infinite; }
.result-star { fill: #f5ead7; stroke: #ab8c62; stroke-width: 1.5; }.result-thread { fill: none; stroke: #a995b7; stroke-width: 1.5; stroke-dasharray: 3 4; }.result-point { fill: #8a739c; }.result-center { fill: #e6a25e; }
.result-kicker { margin: 0 auto 7px; color: #867b71; font-size: 16px; line-height: 1.55; }
.result h2 { margin: 0 auto 8px; font: clamp(34px, 6vw, 52px)/1.3 var(--display); letter-spacing: -.06em; }
.result-tagline { max-width: 520px; margin: 0 auto; color: #544a42; font: 19px/1.6 var(--display); }
.result-note { display: flex; align-items: flex-start; gap: 13px; max-width: 560px; margin: 23px auto 0; padding: 18px 20px; border-radius: 19px; background: #f5f1f7; text-align: left; }
.note-icon { padding-top: 1px; color: #9a7dab; font-size: 20px; }.result-note p { margin: 0; color: #655d67; font-size: 15px; line-height: 1.8; }
.result-stopline { display: flex; align-items: flex-start; gap: 13px; max-width: 560px; margin: 12px auto 0; padding: 16px 20px; border: 1px solid #f0e2cf; border-radius: 18px; background: #fff6e9; text-align: left; }
.stopline-mark { padding-top: 1px; color: #b1844d; font-size: 21px; line-height: 1.4; }.stopline-label { color: #9c7442; font: 15px/1.5 var(--display); }.result-stopline p { margin: 4px 0 0; color: #665746; font-size: 15px; line-height: 1.75; }
.result-facts { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 16px auto 0; }.result-facts span { padding: 7px 12px; border-radius: 99px; background: #fff8ed; color: #6e6256; font-size: 14px; }
.stage-section { margin-top: 30px; padding-top: 23px; border-top: 1px solid #eee6dc; text-align: left; }
.stage-heading { margin-bottom: 14px; }.stage-heading .eyebrow { color: #89766a; }.stage-heading h3 { margin: 11px 0 0; font: 22px var(--display); }
.stage-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; counter-reset: stage; }
.stage-card { position: relative; padding: 17px 19px 18px; border: 1px solid #eee6dc; border-radius: 18px; background: #fffdfa; animation: card-enter .35s ease both; animation-delay: calc(var(--stage-index, 0) * 55ms); }
.stage-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.stage-order { color: #9a7dab; font-size: 14px; }.stage-range { color: #453d37; font: 18px var(--display); font-variant-numeric: tabular-nums; }
.stage-destination { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; color: #6a5d70; font-size: 15px; }
.destination-label { padding: 4px 9px; border-radius: 99px; background: #f0eaf5; color: #755f88; font: 14px var(--display); }
.stage-text { margin: 0; color: #6f655c; font-size: 15px; line-height: 1.75; }
.disclaimer { margin: 17px 0 0; color: #81766c; font-size: 14px; line-height: 1.6; }
.result-actions { width: min(500px, 100%); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 auto; }
.result-actions .primary-button, .result-actions .secondary-button { width: 100%; min-width: 0; min-height: 52px; margin-top: 23px; padding: 0 10px; border-radius: 16px; font-size: 17px; white-space: nowrap; }
.result-actions .primary-button { background: var(--accent); }.result-actions .primary-button:hover { background: #66527e; }
.secondary-button { border: 1px solid #e7ded4; background: #fff; color: var(--ink); font: 16px var(--display); cursor: pointer; transition: background .2s, transform .2s; }
.secondary-button:hover { transform: translateY(-2px); background: #fff9f3; }
.home-link { display: inline-block; margin-top: 20px; color: #82776d; font-size: 14px; text-decoration: underline; text-decoration-color: #d8ccc0; text-underline-offset: 4px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 20; max-width: calc(100vw - 32px); padding: 13px 18px; border-radius: 14px; background: #302b27; color: white; font-size: 14px; opacity: 0; translate: 0 10px; pointer-events: none; transition: opacity .2s, translate .2s; }.toast.is-visible { opacity: 1; translate: 0 0; }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes orbit-turn { to { rotate: 360deg; } }
@keyframes result-enter { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes card-enter { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 680px) {
  .site-header { width: calc(100% - 34px); height: 64px; }.shell { width: min(100% - 28px, 560px); margin-top: 22px; }
  .intro { padding: 32px 24px 28px; border-radius: 24px; }.intro-art { top: 27px; right: 20px; width: 84px; height: 84px; }.intro h1 { max-width: 230px; margin-top: 24px; font-size: clamp(46px, 12vw, 58px); }.intro-copy { font-size: 16px; }.intro-meta { font-size: 14px; gap: 8px; }
  .fortune-form { margin-top: 24px; padding-top: 21px; }.field-grid { grid-template-columns: 1fr; gap: 13px; }.field input { min-height: 52px; }.channel-field { margin-top: 16px; }.channel-field input { max-width: none; }
  .town-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }.town-fieldset legend, .level-fieldset-heading > span { font-size: 17px; }
  .level-grid { gap: 7px; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); }.number-input { padding-inline: 11px; }.level-fieldset-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .result { padding: 34px 20px 29px; border-radius: 24px; }.result-art { width: 140px; height: 112px; margin: 12px auto 14px; }.result-tagline { font-size: 17px; }.result-note, .result-stopline { padding: 16px; }.stage-card { padding: 15px; }.stage-text { font-size: 15px; }.stage-range { font-size: 17px; }.result-actions { gap: 7px; }.result-actions .primary-button, .result-actions .secondary-button { padding-inline: 4px; font-size: 15px; }
}
@media (max-width: 390px) {
  .shell { width: calc(100% - 20px); }.intro { padding-inline: 19px; }.intro-art { display: none; }.intro h1 { max-width: 225px; font-size: 46px; }.intro-meta { align-items: flex-start; flex-direction: column; gap: 5px; }.intro-meta i { display: none; }.town-list { grid-template-columns: 1fr; }.town-input-row label { flex-direction: row; align-items: center; }.town-input-row label span { width: 68px; flex: 0 0 68px; }.remove-town { top: 7px; }.town-input-row.has-remove input { padding-right: 39px; }.level-grid { grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); }.result-actions { gap: 6px; }.result-actions .primary-button, .result-actions .secondary-button { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
