:root {
    --main-navy: #0f1423;
    /* Light Background */
    --bg-dark-2: #151b2e;
    --point-gold: #cfa86e;
    --text-grey: #aab2cd;
    /* Darker Grey for light bg */
    --white: #ffffff;
    /* Dark Navy Text */
    --black: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif KR', serif;
    background-color: var(--main-navy);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
    word-break: keep-all;
    /* Korean text wrapping fix */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}



/* [Header] */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    background: linear-gradient(to bottom, rgba(15, 20, 35, 0.95), rgba(15, 20, 35, 0));
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 100;
}

.brand-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--point-gold);
    letter-spacing: -1px;
    cursor: pointer;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
}

.brand-sub {
    font-size: 0.9rem;
    color: #ddd;
    font-weight: 300;
    margin-left: 12px;
    opacity: 0.8;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 12px;
    line-height: 1;
}

nav ul {
    display: flex;
    gap: 40px;
    color: #eee;
    font-size: 1.05rem;
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--point-gold);
    text-shadow: 0 0 10px rgba(207, 168, 110, 0.5);
}

/* [Hero Section] */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 10% 60px;
    background-image: url('../background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 20, 35, 0.8) 0%, rgba(15, 20, 35, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 50%;
    animation: fadeInLeft 1s ease-out;
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--point-gold);
    line-height: 1.2;
    margin-bottom: 24px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    color: #e0e0e0;
    line-height: 1.8;
    font-weight: 300;
    opacity: 0.9;
}

.hero-obj-container {
    position: relative;
    z-index: 2;
    width: 480px;
    display: flex;
    justify-content: center;
    animation: fadeInRight 1s ease-out;
}

.hero-obj-container img {
    width: 100%;
    height: auto;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(207, 168, 110, 0.2));
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* [Card Container] */
.card-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 0 60px 100px;
    margin-top: -80px;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
}

.card {
    flex: 0 0 auto;
    width: 240px;
    height: 340px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(207, 168, 110, 0.3);
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    background-color: #000;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 2;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    border-color: var(--point-gold);
}

.card:hover::before {
    opacity: 0.3;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover img {
    transform: scale(1.1);
}

/* [Common Section Styles] */
section.section-common {
    padding: 120px 10%;
    text-align: center;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    color: var(--point-gold);
    margin-bottom: 24px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--point-gold);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-desc {
    font-size: 1.15rem;
    color: var(--text-grey);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 70px auto;
    font-weight: 300;
}

/* [Essence Section] */
.essence-section {
    padding: 120px 20px;
    text-align: center;
    background-color: var(--main-navy);
}

.essence-title {
    font-size: 1.8rem;
    color: var(--point-gold);
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.essence-text {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 2;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* [Footer] */
footer {
    background-color: var(--main-navy);
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 10px;
}

.contact {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.2);
}

/* Mobile Footer Adjustments */
@media (max-width: 768px) {
    .essence-text {
        font-size: 1.2rem;
    }
}

body {
    font-family: 'Noto Serif KR', serif;
    background-color: var(--main-navy);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
    word-break: keep-all;
    /* Korean text wrapping fix */
}

/* Screen Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* [Mobile Menu Button] */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 200;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--point-gold);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    header {
        padding: 20px;
    }

    .brand-logo {
        font-size: 1.5rem;
        z-index: 200;
    }

    .brand-sub {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(15, 20, 35, 0.98);
        backdrop-filter: blur(10px);
        z-index: 150;
        transition: right 0.4s ease;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    nav ul li a {
        font-size: 1.5rem;
        font-weight: 700;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        height: auto;
        padding-top: 120px;
        padding-bottom: 80px;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 40px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        /* Adjusted for better wrapping */
    }

    .hero-content p {
        padding: 0 10px;
    }

    .hero-obj-container {
        width: 80%;
        max-width: 320px;
    }

    .card-container {
        gap: 20px;
        padding: 0 20px 60px;
        margin-top: -40px;
    }

    .card {
        width: 100%;
        max-width: 300px;
        height: 380px;
    }

    section.section-common {
        padding: 80px 20px;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* [Lifetime Page Styles] */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 120px 20px 60px;
    /* Header space */
    min-height: 80vh;
}

.page-title {
    font-size: 2.5rem;
    color: var(--point-gold);
    margin-bottom: 40px;
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.5);
    text-align: center;
}

/* Scroll Container (Form) */
/* [Premium Form Styles] */
.scroll-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    /* Compact width for card look */
    background: #ffffff;
    /* Solid White Card */
    color: #333;
    /* Dark text inside the card */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(207, 168, 110, 0.3);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    /* Strong shadow */
    text-align: left;
    margin-bottom: 60px;
}

.form-title {
    color: var(--point-gold);
    font-size: 1.6rem;
    margin-bottom: 40px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.5px;
}

.premium-form-row {
    margin-bottom: 30px;
}

.premium-label {
    display: block;
    color: #666;
    /* Darker label */
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 500;
}

/* Gender Toggle */
.gender-toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    /* Light grey bg */
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.gender-toggle-group input[type="radio"] {
    display: none;
}

.toggle-option {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    color: #888;
    font-weight: 500;
    transition: all 0.3s ease;
}

.gender-toggle-group input[type="radio"]:checked+.toggle-option {
    background-color: var(--point-gold);
    color: #fff;
    /* White text on gold */
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(207, 168, 110, 0.3);
}

/* Date Inputs */
.date-inputs-container {
    display: flex;
    gap: 10px;
}

.date-input-wrapper {
    position: relative;
    flex: 1;
}

.date-input-wrapper:first-child {
    flex: 1.5;
    /* Year is wider */
}

.premium-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    /* Darker border */
    padding: 10px 5px;
    color: #333;
    /* Dark text */
    font-size: 1.1rem;
    font-family: 'Noto Serif KR', serif;
    border-radius: 0;
    transition: border-color 0.3s;
}

.premium-input:focus {
    outline: none;
    border-color: var(--point-gold);
}

.premium-input::placeholder {
    color: #ccc;
    font-size: 0.9rem;
}

.date-unit,
.time-unit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 0.9rem;
    pointer-events: none;
}

.premium-input:focus+.date-unit,
.premium-input:focus+.time-unit {
    color: var(--point-gold);
}

/* Calendar Type & Leap */
.cal-type-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cal-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cal-toggle input[type="radio"] {
    display: none;
}

.cal-option {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    color: #888;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.cal-toggle input[type="radio"]:checked+.cal-option {
    background-color: #fff;
    color: var(--point-gold);
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.leap-check {
    display: flex;
    align-items: center;
}

.leap-check input[type="checkbox"] {
    accent-color: var(--point-gold);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    margin-left: 8px;
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Time Inputs */
.time-inputs-container {
    display: flex;
    gap: 20px;
}

.time-input-wrapper {
    position: relative;
    flex: 1;
}

.premium-helper {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #666;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f1423;
    background: linear-gradient(135deg, #f3d789 0%, #cca64f 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(204, 166, 79, 0.2);
    transition: all 0.3s ease;
    font-family: 'Noto Serif KR', serif;
    margin-top: 20px;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(204, 166, 79, 0.3);
    background: linear-gradient(135deg, #f7dfa0 0%, #dcb965 100%);
}

/* Result Area */
.result-box {
    width: 100%;
    max-width: 800px;
    margin-top: 40px;
    color: #333;
}

.report-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 10px;
}



/* Mobile Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.8rem;
    }

    .scroll-container {
        padding: 30px 20px;
        border-radius: 16px;
    }

    .form-title {
        font-size: 1.4rem;
        margin-bottom: 30px;
    }

    .premium-form-row {
        margin-bottom: 25px;
    }

    .toggle-option {
        padding: 10px;
        font-size: 0.95rem;
    }

    .premium-input {
        font-size: 1rem;
    }

    .emblem-img {
        width: 150px;
    }

    .report-container {
        padding: 20px;
    }
}

/* [Result Report Styles] */
.report-container {
    font-family: 'Noto Serif KR', serif;
}

.daily-summary {
    text-align: left;
}

.section-box {
    border: 1px solid #eee;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.report-container h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 2px solid #555;
    padding-bottom: 10px;
}

.report-container h4 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #555;
}

.report-container p {
    line-height: 1.8;
    color: #444;
}

.highlight {
    background-color: #fffaf0;
    border-color: #ffe8c9;
}

.solution {
    background-color: #f0fff0;
    border-color: #d6e9c6;
}

.tip-box {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    font-size: 0.95em;
    line-height: 1.7;
}

.desc-text {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 0.9em;
}

.sub-text {
    color: #888;
    font-style: italic;
    text-align: center;
    margin-top: 15px;
}

.infobox {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.9em;
    color: #495057;
}

.info-grid .full-width {
    grid-column: 1 / -1;
}

.ohaeng-wood {
    color: #28a745;
    font-weight: bold;
}

.ohaeng-fire {
    color: #dc3545;
    font-weight: bold;
}

.ohaeng-earth {
    color: #fd7e14;
    font-weight: bold;
}

.ohaeng-metal {
    color: #6c757d;
    font-weight: bold;
}

.ohaeng-water {
    color: #007bff;
    font-weight: bold;
}

.saju-table .ilgan-cell {
    background-color: #fff3cd;
}

.daewoon-section {
    margin-top: 15px;
}

.daewoon-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    margin-top: 5px;
}

.daewoon-table th,
.daewoon-table td {
    border: 1px solid #e9ecef;
    padding: 6px 4px;
    font-size: 0.9em;
}

.daewoon-table th {
    background-color: #f8f9fa;
    font-weight: normal;
}

.daewoon-table td {
    font-weight: bold;
}

.ohaeng-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    margin-top: 5px;
}

.ohaeng-table th,
.ohaeng-table td {
    border: 1px solid #e9ecef;
    padding: 6px;
}

.ohaeng-table th {
    background: #f8f9fa;
}

.saju-table {
    width: 100%;
    text-align: center;
    border-collapse: collapse;
    margin: 15px 0;
}

.saju-table th {
    background: #f8f8f8;
    padding: 8px;
    border: 1px solid #ddd;
    font-weight: normal;
    color: #555;
}

.saju-table td {
    padding: 12px 8px;
    border: 1px solid #ddd;
    font-size: 1.25em;
    font-weight: bold;
}

.timeline-list {
    list-style: none;
    padding: 0;
}

.timeline-list li {
    border-left: 3px solid #007bff;
    padding: 0 0 20px 20px;
    position: relative;
}

.timeline-list li:before {
    content: '✓';
    position: absolute;
    left: -12px;
    top: 0;
    background: #007bff;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
}

.timeline-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.timeline-keyword {
    background: #eee;
    color: #555;
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 0.8em;
    margin-left: 10px;
}

.timeline-desc {
    margin: 0;
    font-size: 0.95em;
    color: #555;
}

.theme-list .theme-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}

.theme-list .theme-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.theme-list .score {
    color: #007bff;
    font-size: 1.1em;
}

.theme-list .keyword {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 5px;
}

.theme-list p {
    font-size: 0.95em;
    margin: 0;
}

.solution-list {
    list-style: '🍀';
    padding-left: 20px;
    margin-top: 15px;
}

.solution-list li {
    margin-bottom: 10px;
    padding-left: 10px;
}

@media (max-width: 600px) {
    .section-box {
        padding: 20px;
    }

    .report-container h3 {
        font-size: 1.3em;
    }

    .report-container h4 {
        font-size: 1.1em;
    }
}

/* [Monthly Fortune Grid] */
.monthly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.monthly-card {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    background: #fafafa;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.monthly-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: var(--point-gold);
}

.monthly-header {
    font-weight: bold;
    color: var(--point-gold);
    margin-bottom: 8px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    font-size: 1.05em;
}

.monthly-card p {
    font-size: 0.9em;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .monthly-grid {
        grid-template-columns: 1fr;
        /* 모바일에서는 1열 */
    }
}

/* [Compatibility Report Styles] */
.report-container {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.section-box {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.section-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.section-box h3 {
    font-size: 1.5rem;
    color: var(--main-navy);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--point-gold);
    padding-bottom: 10px;
    display: inline-block;
}

.section-box h4 {
    font-size: 1.2rem;
    color: #444;
    margin-top: 10px;
    margin-bottom: 10px;
    font-weight: 700;
}

.section-box p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    word-break: keep-all;
}

/* Score Section */
.section-box.highlight {
    background: linear-gradient(135deg, #fff 0%, #fff9f0 100%);
    border: 1px solid var(--point-gold);
}

.text-center {
    text-align: center;
}

.score-display {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 5px;
}

.score-number {
    font-size: 5rem;
    font-weight: 800;
    color: #e91e63;
    line-height: 1;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.score-unit {
    font-size: 1.5rem;
    color: #555;
    font-weight: 500;
}

/* Dual Saju Table */
.dual-saju-container {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.saju-table-wrapper {
    flex: 1;
    min-width: 0;
    /* Prevent flex item overflow */
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #eee;
}

/* Total Review (Overview) */
.overview-box {
    background: #fff;
    /* border-left removed */
}

.total-review-content {
    font-size: 1rem;
    /* Reduced from 1.1rem */
    line-height: 1.8;
    /* Reduced from 2 */
    color: #333;
    text-align: justify;
    padding: 10px;
}

.total-review-content strong {
    color: #0f1423;
    background: linear-gradient(to top, rgba(207, 168, 110, 0.3) 40%, transparent 40%);
    padding: 0 4px;
}

/* Chemistry Section */
.chemistry-box {
    background: linear-gradient(135deg, #fff5f8 0%, #fff 100%);
    border: 1px solid #ffcdd2;
}

.chemistry-content h4 {
    color: #e91e63;
    font-size: 1.2rem;
    /* Reduced from 1.3rem */
    margin-bottom: 15px;
}

/* Theme Grid (Reverted to Single Column) */
.theme-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.theme-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    /* Reduced padding */
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-color: var(--point-gold);
}

.theme-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.theme-icon {
    font-size: 1.4rem;
    /* Reduced */
    margin-right: 8px;
}

.theme-name {
    font-size: 1.1rem;
    /* Reduced */
    font-weight: 700;
    color: var(--main-navy);
}

.theme-text {
    font-size: 0.95rem;
    /* Reduced from 1rem */
    color: #555;
    line-height: 1.6;
}

/* Theme Card Accents Removed */
/* .theme-card.wealth { border-top: 4px solid #ffd700; } */
/* .theme-card.comm { border-top: 4px solid #4caf50; } */
/* .theme-card.conflict { border-top: 4px solid #f44336; } */
/* .theme-card.child { border-top: 4px solid #2196f3; } */

/* Mobile Responsive for Compatibility */
@media (max-width: 768px) {
    .dual-saju-container {
        flex-direction: column;
    }

    .saju-table-wrapper {
        width: 100%;
    }

    .score-number {
        font-size: 3.5rem;
        /* Reduced from 4rem */
    }

    .section-box {
        padding: 20px;
    }

    .section-box h3 {
        font-size: 1.2rem;
        /* Reduced */
    }

    .theme-grid {
        grid-template-columns: 1fr;
    }
}

/* [Missing UI Renderer Styles] */

.narrative-box {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 15px;
}

.lifecycle-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lifecycle-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--point-gold);
}

.stage-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--main-navy);
    margin-bottom: 5px;
}

.stage-keyword {
    display: inline-block;
    background: #eee;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 10px;
}

.stage-desc {
    color: #444;
    line-height: 1.6;
}

.theme-score {
    margin-left: auto;
    font-weight: 700;
    color: var(--point-gold);
}

.theme-keyword {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 8px;
}

.solution-guide {
    font-weight: 500;
    color: var(--main-navy);
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
}

.action-list {
    list-style: none;
    padding: 0;
}

.action-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.action-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
}

.monthly-item {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    background: #fafafa;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.monthly-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: var(--point-gold);
}

/* [Premium UI Redesign] */

/* Report Container - Parchment Look */
.premium-report {
    background-color: #fdfbf7;
    /* Warm parchment color */
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    border: 1px solid #e8e0d5;
    border-radius: 4px;
    /* Sharp corners for paper feel */
    padding: 60px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.05),
        0 10px 40px rgba(0, 0, 0, 0.1),
        inset 0 0 120px rgba(207, 168, 110, 0.05);
    /* Inner glow */
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* Decorative Frame */
.premium-report::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid rgba(207, 168, 110, 0.3);
    pointer-events: none;
}

.premium-report::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    bottom: 18px;
    border: 1px solid rgba(207, 168, 110, 0.15);
    pointer-events: none;
}

/* Typography Overrides */
.premium-report h3 {
    font-family: 'Noto Serif KR', serif;
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    border-bottom: none;
    text-align: center;
    letter-spacing: -0.02em;
}

.premium-report .subtitle {
    display: block;
    text-align: center;
    color: #8e7d6b;
    /* Muted gold/brown */
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 15px;
}

.premium-report .subtitle::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: #d4c5b0;
    margin: 15px auto 0;
}

/* Premium InfoBox (Saju Grid) */
.premium-infobox {
    background: #fff;
    border: 1px solid #efeadd;
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 1;
}

.infobox-header {
    text-align: center;
    margin-bottom: 30px;
}

.birth-details {
    display: flex;
    justify-content: center;
    gap: 15px;
    color: #666;
    font-size: 0.95rem;
    margin-top: 10px;
}

.birth-details .divider {
    color: #ddd;
}

.saju-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 30px 0;
}

.saju-pillar {
    text-align: center;
    position: relative;
}

.saju-pillar:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 20%;
    height: 60%;
    width: 1px;
    background-color: #f5f5f5;
}

.pillar-label {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pillar-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: 'Noto Serif KR', serif;
    /* Or a specific Hanja font if available */
}

.gan,
.ji {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.3s ease;
}

.saju-pillar:hover .gan,
.saju-pillar:hover .ji {
    transform: scale(1.1);
}

/* Ohaeng Colors (Subtle) */
.wood {
    color: #4caf50;
}

.fire {
    color: #e53935;
}

.earth {
    color: #d4a017;
}

.metal {
    color: #78909c;
}

.water {
    color: #1e88e5;
}

/* Saju Footer - Always Vertical Stack */
.saju-footer {
    display: flex;
    flex-direction: column;
    /* Force vertical stacking */
    gap: 20px;
    padding-top: 20px;
    border-top: 1px dashed #eee;
    font-size: 0.9rem;
}

/* Simple Ohaeng Table Design (Minimalist) */
.ohaeng-simple-table {
    width: 100%;
    overflow-x: auto;
}

.simple-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.simple-table th {
    padding: 10px;
    background-color: #f5f5f5;
    /* Neutral gray background */
    color: #333;
    /* Dark text */
    font-weight: 700;
    border-bottom: 1px solid #ddd;
    font-size: 0.9rem;
}

/* Remove colorful backgrounds, use subtle text colors if needed or just black */
.simple-table th.wood {
    color: #2e7d32;
}

.simple-table th.fire {
    color: #c62828;
}

.simple-table th.earth {
    color: #f9a825;
}

.simple-table th.metal {
    color: #455a64;
}

.simple-table th.water {
    color: #1565c0;
}

.simple-table td {
    padding: 12px;
    border: 1px solid #eee;
    font-weight: bold;
    color: #333;
    background: #fff;
    font-size: 1.1rem;
}

/* Report Sections */
.report-section {
    margin-bottom: 60px;
    position: relative;
}

.narrative-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #4a4a4a;
    text-align: left;
    /* Changed from justify to left */
    padding: 0 20px;
}

.narrative-content p {
    margin-bottom: 1.5rem;
}

.highlight-section {
    background: rgba(255, 255, 255, 0.6);
    padding: 40px;
    border-radius: 2px;
    border: 1px solid rgba(207, 168, 110, 0.1);
}

/* Timeline */
.lifecycle-timeline {
    position: relative;
    padding: 20px 0;
}

.lifecycle-timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #eee;
}

.timeline-item {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
}

.timeline-marker {
    flex: 0 0 50px;
    height: 50px;
    background: #fff;
    border: 2px solid var(--point-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--point-gold);
    font-size: 1.2rem;
    z-index: 1;
    box-shadow: 0 0 0 5px #fdfbf7;
    /* Mask line */
}

.timeline-content {
    flex: 1;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f0f0;
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stage-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
}

.stage-keyword {
    font-size: 0.9rem;
    color: #888;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Theme Cards Premium */
.theme-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.theme-grid-premium.single-col {
    grid-template-columns: 1fr;
}

.premium-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--point-gold);
}

.card-header {
    padding: 20px;
    background: #fcfcfc;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-wrapper {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.theme-name {
    font-weight: 700;
    color: #333;
    font-size: 1.05rem;
}

.theme-keyword {
    font-size: 0.85rem;
    color: #999;
}

.score-badge {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--point-gold);
}

.card-body {
    padding: 20px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

/* Monthly Grid Premium */
.monthly-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.monthly-grid-premium.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.monthly-grid-premium.monthly-list-view {
    grid-template-columns: 1fr;
}

.monthly-grid-premium.monthly-list-view .monthly-card-premium {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
}

.monthly-grid-premium.monthly-list-view .month-label {
    min-width: 60px;
    text-align: center;
    margin-bottom: 0;
    align-self: flex-start;
    padding: 4px 12px;
    font-size: 0.9rem;
}

.monthly-grid-premium.monthly-list-view p {
    margin: 0;
    flex: 1;
    line-height: 1.7;
    word-break: keep-all;
}

@media (max-width: 600px) {
    .monthly-grid-premium.monthly-list-view .monthly-card-premium {
        flex-direction: column;
        gap: 10px;
    }

    .monthly-grid-premium.monthly-list-view .month-label {
        align-self: flex-start;
    }
}

.monthly-card-premium {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
}

.monthly-card-premium:hover {
    border-color: var(--point-gold);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.month-label {
    display: inline-block;
    background: var(--point-gold);
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Solution Section */
.solution-section {
    background: #f0f7f4;
    /* Very light mint/green tint */
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #dbece5;
}

.solution-guide {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2e7d32;
    margin-bottom: 25px;
    text-align: center;
}

.premium-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 15px;
}

.premium-list li {
    background: #fff;
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    color: #444;
}

.premium-list li::before {
    content: '✨';
    margin-right: 15px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .premium-report {
        padding: 30px 20px;
    }

    .saju-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .saju-pillar:nth-child(2)::after {
        display: none;
        /* Remove divider for 2x2 grid */
    }

    .timeline-item {
        flex-direction: column;
        gap: 15px;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lifecycle-timeline::before {
        left: 19px;
    }

    .premium-infobox {
        padding: 20px;
    }
}

/* Daewoon Scroll */
.daewoon-container {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.daewoon-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 700;
}

.daewoon-scroll {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.daewoon-item {
    flex: 0 0 auto;
    text-align: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    min-width: 60px;
}

.daewoon-ganji {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    font-family: 'Noto Serif KR', serif;
}

.daewoon-age {
    font-size: 0.8rem;
    color: #888;
}

/* Ohaeng Bar Chart */
.ohaeng-chart-wrapper {
    flex: 1;
    margin-right: 20px;
}

.ohaeng-bar-chart {
    display: flex;
    height: 24px;
    background: #eee;
    border-radius: 12px;
    overflow: hidden;
    margin: 10px 0;
}

.bar {
    height: 100%;
    transition: width 0.5s ease;
}

.bar.wood {
    background-color: #4caf50;
}

.bar.fire {
    background-color: #e53935;
}

.bar.earth {
    background-color: #d4a017;
}

.bar.metal {
    background-color: #78909c;
}

.bar.water {
    background-color: #1e88e5;
}

.ohaeng-legend {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: #666;
    flex-wrap: wrap;
}

/* Daily Score Box */
.daily-score-box {
    text-align: center;
    margin-bottom: 30px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border: 4px solid #333;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.score-val {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.score-label {
    font-size: 1rem;
    font-weight: 500;
}

.daily-title {
    font-size: 1.4rem;
    color: #333;
    font-weight: 700;
}

/* Compatibility Specifics */
.dual-saju-container {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.saju-table-wrapper {
    flex: 1;
    min-width: 0;
    /* Prevent flex item from overflowing */
}

/* Adjust Saju InfoBox when inside Compatibility view */
.dual-saju-container .premium-infobox {
    padding: 20px;
    margin-bottom: 0;
}

.dual-saju-container .saju-grid {
    gap: 10px;
    padding: 15px 0;
}

.dual-saju-container .gan,
.dual-saju-container .ji {
    font-size: 1.5rem;
    /* Smaller font for side-by-side view */
}

.chem-title {
    color: #e91e63;
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
}

.chemistry-box {
    background: linear-gradient(to bottom right, #fff5f8, #fff);
    border: 1px solid #ffcdd2;
}

/* Mobile Adjustments for Layouts */
/* Mobile Responsiveness & Unification */
@media (max-width: 768px) {

    /* 1. Container Padding Unification */
    .premium-report {
        padding: 30px 20px;
        /* Standardized padding for mobile */
    }

    /* 2. Section Spacing Unification */
    .report-section {
        margin-bottom: 40px;
        /* Reduced bottom margin between sections */
    }

    /* 3. Narrative Text Optimization */
    .narrative-content {
        padding: 0;
        /* Remove side padding to use full width */
        text-align: left;
        /* Left align for readability */
        font-size: 1.05rem;
        /* Slightly smaller but readable font size */
        line-height: 1.7;
        /* Comfortable line height */
        word-break: keep-all;
        /* Prevent awkward word breaks for Korean */
        word-wrap: break-word;
        /* Ensure long words wrap */
    }

    .narrative-content p {
        margin-bottom: 1rem;
        /* Adjust paragraph spacing */
    }

    /* 4. Saju Grid Optimization */
    .saju-grid {
        grid-template-columns: repeat(4, 1fr);
        /* Keep 4 cols */
        gap: 5px;
        /* Tight gap */
        padding: 20px 0;
    }

    .gan,
    .ji {
        font-size: 1.4rem;
        /* Adjusted font size */
    }

    .pillar-label {
        font-size: 0.75rem;
        /* Smaller labels */
    }

    /* 5. Dual Saju (Compatibility) Stacking */
    .dual-saju-container {
        flex-direction: column;
        gap: 30px;
    }

    /* 6. Monthly Grid & Theme Grid */
    .monthly-grid-premium.two-col,
    .theme-grid-premium.single-col {
        grid-template-columns: 1fr;
        /* Force single column */
    }

    /* 7. Footer & Charts */
    .saju-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .ohaeng-chart-wrapper {
        width: 100%;
        margin-right: 0;
    }

    .daewoon-scroll {
        gap: 10px;
    }

    .daewoon-item {
        min-width: 50px;
        padding: 8px;
    }

    /* Birth Details Wrapping on Mobile */
    .birth-details {
        flex-wrap: wrap;
        gap: 5px 10px;
    }

    .detail-item {
        white-space: nowrap;
    }
}

/* Force wrapping for birth details in Compatibility View (Dual Saju) on ALL screens */
.dual-saju-container .birth-details {
    flex-wrap: wrap;
    gap: 5px 10px;
}

.dual-saju-container .detail-item {
    white-space: nowrap;
}

/* Global Text Optimization for Korean */
.narrative-content {
    word-break: keep-all;
    /* Apply globally for better Korean typography */
    overflow-wrap: break-word;
}

/* Explanation Section Styling Enhancement */
.highlight-section {
    background: #fff;
    /* Clean white background */
    border: 1px solid #e0e0e0;
    /* Subtle border */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    /* Soft shadow */
    padding: 30px;
    /* Comfortable padding */
}





/* Power Stat Box (Separated) */
.power-stat-box {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #eee;
}

.power-stat-box .stat-label {
    font-weight: bold;
    color: #555;
    margin-right: 8px;
}

.power-stat-box .stat-value {
    font-weight: 800;
    font-size: 1.1rem;
}

.power-stat-box .strong {
    color: #d4a017;
}

.power-stat-box .weak {
    color: #78909c;
}

/* Flat Solution Section (Mobile Optimized) */
.solution-section-flat {
    background: #f8fcf9;
    /* Very subtle green tint */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
}

.solution-header-flat h3 {
    font-size: 1.2rem;
    color: #2e7d32;
    margin: 0;
    font-weight: 700;
}

.solution-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 15px 0;
}

.solution-content-flat p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    text-align: left;
    word-break: keep-all;
    margin: 0;
}

@media (max-width: 768px) {
    .solution-section-flat {
        padding: 20px 15px;
        /* Reduced side padding for max width */
    }

    .solution-content-flat p {
        font-size: 1rem;
    }
}