/* 타로 서브페이지와 정밀 일치시킨 3:1 분할 스플릿 구조 */
.sub-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
    display: flex;
    gap: 50px;
    align-items: flex-start;
    /* 💡 중요: 자식 요소들이 부모 높이를 강제 상속받지 않도록 설정 */
    height: auto;
    /* 고정 높이 해제 */
}

.destiny-container {
    max-width: 1200px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    padding: 50px 40px;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.destiny-input-wrapper {
    width: 100%;
    max-width: 680px;
    animation: fadeIn 0.4s ease-out;
    margin: 0 auto;
}

.destiny-input-box {
    /* background-color: var(--bg-surface); */
    /* border: 1px solid var(--border-color); */
    padding: 50px 40px;
    text-align: center;
    /* box-shadow: 0 20px 50px rgba(0,0,0,0.6); */
}

.input-guide {
    font-family: "Noto Serif KR", serif;
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 25px;
    font-weight: 300;
    line-height: 1.6;
}

/* 👑 커스텀 라디오 버튼 스타일 킷 */
.calendar-type-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.radio-container {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-muted);
    user-select: none;
    padding-left: 28px;
    font-family: "Noto Serif KR", serif;
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-radio {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 16px;
    width: 16px;
    background-color: #0b0c10;
    border: 1px solid var(--border-color);
    border-radius: 50%;
}

.radio-container:hover input ~ .custom-radio {
    border-color: var(--gold-bright);
}

.radio-container input:checked ~ .custom-radio {
    background-color: var(--gold-bright);
    border-color: var(--gold-bright);
}

.custom-radio:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-container input:checked ~ .custom-radio:after {
    display: block;
}

.radio-container .custom-radio:after {
    top: 4px;
    left: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0b0c10;
}

.radio-container input:checked {
    color: var(--gold-bright) !important;
}

.input-select-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 45px;
}

.select-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

#birth-year,
#birth-month,
#birth-day {
    background: #0b0c10;
    border: 1px solid var(--border-color);
    color: var(--gold-bright);
    font-family: "Cinzel", serif;
    font-size: 1.5rem;
    height: 50px;
    text-align: center;
    letter-spacing: 0.05em;
    padding: 0 10px;
}

#birth-year {
    width: 120px;
}
#birth-month,
#birth-day {
    width: 90px;
    cursor: pointer;
    border-radius: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://w3.org' width='12' height='12' viewBox='0 0 24 24' fill='%23C5A059'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 25px;
}

#birth-year:focus,
#birth-month:focus,
#birth-day:focus {
    outline: none;
    border-color: var(--gold-bright);
}
#birth-year::-webkit-inner-spin-button,
#birth-year::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.unit-label {
    font-family: "Noto Serif KR", serif;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* 결과 분할 레이아웃 구역 */
.destiny-split-result-zone {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
}
.split-layout-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    width: 100%;
}
.destiny-panel {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 45px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}
.left-panel {
    animation: slideFromLeft 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.right-panel {
    animation: slideFromRight 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.comment {
    color: rgba(197, 160, 89, 0.3);
}

@keyframes slideFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes slideFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.panel-header-badge {
    position: absolute;
    top: 20px;
    font-family: "Cinzel", serif;
    font-size: 0.75rem;
    color: var(--gold-bright);
    letter-spacing: 0.15em;
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    padding-bottom: 3px;
}
.panel-visual-core {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 25px;
}
.element-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 2px solid rgba(197, 160, 89, 0.3);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: background-color 0.5s ease;
}
.tarot-frame-placeholder {
    width: 90px;
    height: 135px;
    background-color: #0b0c10;
    border: 0px solid var(--gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-bright);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}
.panel-visual-core h4 {
    font-size: 1.3rem;
    color: var(--text-light);
    text-align: center;
}
.panel-narrative {
    width: 100%;
}
.result-meta {
    font-size: 0.8rem;
    color: var(--gold-bright);
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.1);
    padding-bottom: 5px;
}
.panel-narrative p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
    text-align: justify;
    font-weight: 300;
}
.result-control-footer {
    text-align: center;
}
.btn-ritual-gold {
    background: transparent;
    color: #c5a059;
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: 50px;
    padding: 12px 45px;
    font-family: "Noto Serif KR", serif;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.4s ease;
}
.btn-ritual-gold:hover {
    color: #0b0c10;
    background-color: #c5a059;
    border-color: #c5a059;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
}
.btn-ritual-ghost {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 8px 25px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-ritual-ghost:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 📱 모바일 브레이크 타겟팅 반응형 스택 레이아웃 */
@media (max-width: 950px) {
    .sub-container {
        flex-direction: column;
        gap: 35px;
        padding: 0 15px;
        margin: 30px auto;
    }

    .sidebar {
        position: static;
        width: 100%;
        order: 2;
    }

    .content-area {
        width: 100%;
        order: 1;
    }

    .dictionary-container {
        padding: 35px 20px;
    }

    .calendar-picker-row {
        flex-direction: column;
        gap: 15px;
    }

    .match-vs-sign {
        margin-top: 0;
        transform: rotate(90deg);
        margin: 5px 0;
    }

    .mystic-date-picker {
        width: 100%;
        max-width: 260px;
    }

    .split-layout-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 800px) {
    body {
        overflow-y: auto;
    }
    .destiny-container {
        height: auto;
        margin: 30px auto;
    }
    .input-select-row {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }
    .select-group {
        width: 100%;
        justify-content: center;
    }
    #birth-year,
    #birth-month,
    #birth-day {
        width: 150px;
    }
    .split-layout-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .destiny-panel {
        padding: 35px 20px;
    }
}
