:root {
    --bg-main: #eaddcf;
    /* Darker Beige (Kraft Paper) */
    --bg-card: #f7f1e3;
    /* Light Beige */
    --text-primary: #2d3436;
    /* Soft Black */
    --text-secondary: #636e72;
    /* Dark Grey */
    --accent-color: #6d4c41;
    /* Coffee */
    --accent-sub: #558b2f;
    /* Olive */
    --accent-warn: #c62828;
    /* Deep Red */
    --border-color: #d7ccc8;
    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Global Reset for Sizing */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Noto Serif KR', serif;
    /* Soft Base Font */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    width: 100%;
    /* Force width */
    font-weight: 500;
    /* Softer, not too bold */
}

h1,
h2,
h3,
h4,
strong,
b,
.logo,
.cta-button,
.gate-btn,
.shop-button {
    font-family: 'Gowun Batang', serif;
    font-weight: 900 !important;
    /* Headings stay bold */
}

.dashboard-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 15px;
}

header {
    display: none;
}

/* Using Sidebar Title */

.main-grid {
    display: grid;
    grid-template-columns: 320px 1fr 280px;
    gap: 20px;
    margin-top: 20px;
}

/* Panels */
.panel {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

/* Sidebar Title */
.logo {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 5px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

/* Form Elements - Fixed Width & Soft Font */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
    color: var(--accent-color);
    font-size: 1.1rem;
    border-left: 4px solid var(--accent-warn);
    padding-left: 10px;
    line-height: 1.2;
}

input,
select {
    width: 100%;
    /* Force Full Width */
    padding: 12px 14px;
    border: 2px solid #bcaaa4;
    /* Soft Border */
    border-radius: 10px;
    background: #fff;
    font-size: 1rem;
    margin-bottom: 20px;
    color: #4e342e;
    font-family: 'Noto Serif KR', serif;
    /* Soft Font */
    font-weight: 500;
    /* Soft Weight */
    box-sizing: border-box;
    /* PREVENT OVERFLOW */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

input:focus,
select:focus {
    border-color: var(--accent-sub);
    outline: none;
    box-shadow: 0 0 0 3px rgba(85, 139, 47, 0.2);
}

.radio-group {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.radio-group label {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: #efebe9;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-secondary);
    border: 2px solid transparent;
    box-sizing: border-box;
}

.radio-group label:has(input:checked) {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

.cta-button {
    width: 100%;
    padding: 16px;
    background: var(--text-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
}

/* Result Section */
.result-panel {
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
}

.analysis-header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px dashed var(--border-color);
    margin-bottom: 15px;
}

.highlight {
    font-size: 2.2rem;
    color: var(--accent-warn);
    font-weight: 900;
}

.result-card {
    background: #fff;
    border: 2px solid var(--border-color);
    border-left: 6px solid #8d6e63;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.result-card h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.result-card p {
    margin: 0;
    color: #4e342e;
    line-height: 1.6;
    font-size: 1rem;
}

/* Lotto Gate */
.lotto-section {
    background: #eceff1;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    border: 2px solid #cfd8dc;
}

.lotto-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
    filter: blur(10px);
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    /* Default Blurred */
    transition: filter 0.5s;
}

.lotto-ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    display: flex;
    justify-content: center;
    align-items: center;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

/* Gate Overlay */
.lotto-gate-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    flex-direction: column;
}

.gate-msg {
    color: white;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 1.1rem;
}

.gate-btn {
    background: #d84315;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 0 #bf360c;
    font-size: 1rem;
}

.gate-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.close-ad-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

.close-ad-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Wings & Ads */
.ad-banner {
    background: #efebe9;
    border: 2px dashed #bcaaa4;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #a1887f;
    font-weight: bold;
}

.wing-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 600px;
    background: #eaddcf;
    border: 2px dashed #bcaaa4;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.left-wing {
    left: 10px;
}

.right-wing {
    right: 10px;
}

/* Responsive */
@media (max-width: 1700px) {
    .wing-ad {
        display: none;
    }
}

@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .input-panel,
    .ad-sidebar {
        display: none;
    }

    .dashboard-container {
        grid-template-rows: auto auto 1fr;
    }

    .input-panel {
        display: block;
        order: 1;
    }

    .result-panel {
        display: block;
        order: 2;
    }

    .ad-sidebar {
        display: block;
        order: 3;
    }
}

.hidden {
    display: none !important;
}

/* Shop Button */
.shop-button {
    text-decoration: none;
    color: white;
    background: #795548;
    padding: 14px 30px;
    border-radius: 50px;
    display: inline-block;
    font-weight: 900;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.shop-button:hover {
    transform: scale(1.05);
    background: #5d4037;
}

/* 쿠팡 파트너스 공지 푸터 */
.coupang-notice {
    grid-column: 1 / -1;
    width: 100%;
    background: #f0ebe3;
    border-top: 1px solid #d7ccc8;
    text-align: center;
    padding: 12px 20px;
    margin-top: 10px;
    border-radius: 0 0 8px 8px;
}

.coupang-notice p {
    margin: 0;
    font-size: 0.75rem;
    color: #888;
    font-family: 'Noto Serif KR', serif;
    line-height: 1.6;
}