:root {
    --primary: #2c3e50;
    --secondary: #34495e;
    --accent: #e74c3c;
    --discount: #27ae60;
    --warning: #d35400;
    --cta-color: #ff9f43;
    --cta-hover: #ff7f50;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-sub: #666666;
    --border: #e0e0e0;
    --input-bg: #f9f9f9;
    --radius: 12px;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    padding: 40px 10px;
    margin: 0;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 680px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

.app-logo {
    max-width: 80%;
    height: auto;
    width: 350px;
    display: block;
    margin: 0 auto;
}

h1.title {
    text-align: center;
    margin-bottom: 15px;
    margin-top: 0;
    padding: 0 10px;
}

.subtitle {
    text-align: center;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.intro-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-sub);
    margin-bottom: 10px;
    background: #f0f4f8;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

/* --- トップへ戻るリンク --- */
.site-nav {
    text-align: left;
    margin-top: -20px;
    margin-bottom: 15px;
    padding: 0 5px;
}

.back-link {
    text-decoration: none;
    color: #95a5a6;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-weight: bold;
}

.back-link:hover {
    color: var(--primary); 
    transform: translateX(-3px);
}

/* --- PR表記 --- */
.pr-notice {
    font-size: 0.75rem;
    color: #95a5a6;
    text-align: right;
    margin: 0 0 5px 0;
    padding: 0 5px;
}

/* フォームデザイン */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group { margin-bottom: 0; }
.form-group.full-width { grid-column: span 2; }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--secondary);
}

input, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    background: var(--input-bg);
    transition: all 0.3s ease;
    appearance: none;
}

select {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

input:focus, select:focus {
    background: #fff;
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

button.calc-btn {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
    letter-spacing: 0.05em;
}
button.calc-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.4);
}

/* 結果エリア */
.result {
    margin-top: 40px;
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 12px;
    display: none;
    animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.result-header {
    background: var(--primary);
    color: #fff;
    padding: 25px;
    text-align: center;
    border-radius: 9px 9px 0 0; 
}
.result-header-title { font-size: 0.9rem; opacity: 0.9; margin-bottom: 5px; }
.total-price {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 5px 0 10px 0;
    line-height: 1;
}
.range-price {
    font-size: 0.9rem;
    background: rgba(255,255,255,0.2);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
}

/* 詳細リスト */
.detail-list { padding: 0; margin: 0; list-style: none; }
.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 25px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    align-items: center;
}
.detail-item:last-child { border-bottom: none; }

.sub-item {
    background-color: #f8f9fa;
    padding-left: 40px;
    font-size: 0.9rem;
    color: var(--text-sub);
}
.item-label { display: flex; align-items: center; gap: 8px; }
.price-col { font-weight: 700; font-family: 'Noto Sans JP', sans-serif; font-size: 1.1rem; }

.category-title {
    background-color: #ecf0f1;
    padding: 10px 25px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--secondary);
    letter-spacing: 0.05em;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* アドバイスBOX */
.advice-box {
    padding: 20px;
    margin: 20px;
    background: #fffbf0;
    color: #8a6d3b;
    font-size: 0.95rem;
    line-height: 1.7;
    border: 1px solid #faebcc;
    border-radius: 8px;
}
.advice-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #d35400;
}
.surcharge-alert { color: var(--accent); }
.discount-alert { color: var(--discount); font-weight: bold; }
.warning-text { color: #c0392b; font-weight: bold; }

/* CTAエリア */
.cta-section {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 25px 20px;
    text-align: center;
    margin: 20px;
    border-radius: 8px;
    border: 1px solid #ffcc80;
}
.cta-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #d35400;
    margin-bottom: 10px;
}
.cta-desc {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}
.cta-button {
    display: block;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    padding: 16px;
    background: linear-gradient(to bottom, #ff9f43, #e67e22);
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 0 #d35400, 0 8px 15px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    position: relative;
    top: 0;
    box-sizing: border-box;
}
.cta-button:active {
    top: 4px;
    box-shadow: 0 0 0 #d35400, 0 3px 5px rgba(0,0,0,0.1);
}
.cta-note {
    font-size: 0.75rem;
    color: #7f8c8d;
    margin-top: 10px;
}

/* チャートエリア */
.chart-wrapper { background: #fff; padding: 20px; }
.chart-container { padding: 10px; max-width: 300px; margin: 0 auto; }
.line-chart-container { padding: 10px; max-width: 100%; height: 350px; }

.disclaimer { font-size: 0.75rem; color: #999; margin-top: 20px; line-height: 1.5; }

/* FAQ & Footer */
.faq-section { margin-top: 50px; border-top: 2px dashed var(--border); padding-top: 40px; }
.faq-section h2 { text-align: center; margin-bottom: 30px; color: var(--primary); font-size: 1.4rem; }
.faq-item { margin-bottom: 20px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.faq-item h3 { margin: 0 0 10px 0; font-size: 1rem; color: var(--primary); display: flex; align-items: center; line-height: 1.4; }
.faq-item h3::before { content: "Q"; background: var(--accent); color: #fff; font-size: 0.8rem; font-weight: bold; padding: 2px 8px; border-radius: 4px; margin-right: 12px; flex-shrink: 0; }
.faq-item p { margin: 0; font-size: 0.9rem; color: var(--text-sub); line-height: 1.7; padding-left: 36px; }

.footer-links { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; font-size: 0.8rem; }
.footer-links a { color: var(--text-sub); text-decoration: none; margin: 0 10px; }
.footer-links a:hover { text-decoration: underline; }
.copyright { text-align: center; margin-top: 15px; font-size: 0.75rem; color: #ccc; }

/* スマホ対応 */
@media (max-width: 600px) {
    .container { 
        padding: 25px 15px;
    }
    .form-grid { 
        grid-template-columns: 1fr; 
        gap: 15px; 
    }
    .form-group.full-width { 
        grid-column: span 1; 
    }
    .total-price { 
        font-size: 2.2rem; 
    }
    .detail-item { 
        padding: 12px 15px; 
    }
    
    .advice-box, .cta-section {
        margin: 15px 10px;
        padding: 20px 15px;
    }
    
    .faq-item p { 
        padding-left: 0; 
        margin-top: 8px; 
    }
}