/* --- General Body and Container --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Page Header Style */
.site-header {
    width: 100%;
    background-color: #ffffff;
    color: #333333;
    padding-top: 15px;
    padding-bottom: 15px;
    margin-bottom: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-content { width: 95%; max-width: 600px; margin: 0 auto; }
.site-header h1 { margin: 0; font-size: 1.8em; color: #1abc9c; }
.site-header .subtitle { color: #7f8c8d; margin: 0; font-size: 1em; }
.beta-tag { font-size: 0.6em; color: #e74c3c; margin-left: 2px; vertical-align: top; font-weight: bold; }

/* Main Container Style */
.container {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 95%;
    max-width: 600px;
    margin: 20px auto;
}

/* Breadcrumbs Style (Moved inside container) */
.breadcrumbs {
    width: 100%;
    background-color: transparent;
    padding: 0 0 15px 0;
    margin-bottom: 10px;
    font-size: 0.85em;
    color: #7f8c8d;
    border-bottom: 1px solid #f0f0f0;
}
.breadcrumbs a {
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.3s;
}
.breadcrumbs a:hover {
    color: #333;
    text-decoration: underline;
}
.breadcrumbs .current-page {
    color: #333; /* 現在地を少し濃く */
}

/* Page Footer Style */
.page-footer {
    width: 100%;
    background-color: #34495e;
    color: #ddd;
    padding: 30px 0 20px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
    margin-top: auto;
}
.footer-content { max-width: 600px; width: 95%; margin: 0 auto; padding: 0 10px; }

/* Footer Flex Layout for wide screens */
.footer-links-row {
    display: flex;
    justify-content: flex-start;
    gap: 40px; /* 横並び時の間隔 */
    margin-bottom: 20px;
}
.footer-section { margin-bottom: 0; }
.footer-section .section-title { font-size: 1.0em; font-weight: bold; color: #1abc9c; margin-bottom: 8px; margin-top: 0; }
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section li { margin-bottom: 5px; }
.footer-section li a { color: #ccc; text-decoration: none; font-size: 0.9em; transition: color 0.3s; }
.footer-section li a:hover { color: #fff; text-decoration: underline; }

.copyright { text-align: center; font-size: 0.8em; color: #95a5a6; margin-top: 20px; padding-top: 15px; border-top: 1px solid #556c80; }

/* --- Specific Styles for Resume Calculator --- */

h2 { font-size: 1.5em; color: #34495e; border-left: 5px solid #16a085; padding-left: 10px; margin: 20px 0 15px; }
.notice { font-size: 0.8em; color: #7f8c8d; margin-top: 5px; }

/* Controls */
.controls-wrapper { background-color: #f8f9fa; padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.input-section { padding: 10px 0; border-top: 1px dashed #ddd; margin-top: 15px; }
.active { display: block; }

/* Birth Input Group */
.birth-input-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.input-item { flex: 1; }
.input-item label { display: block; font-weight: bold; color: #555; font-size: 0.9em; margin-bottom: 4px; }
.input-item select {
    width: 100%; padding: 10px; font-size: 16px; border: 1px solid #ddd; border-radius: 5px; background-color: #fff;
}
#birth-year { flex: 2; }

/* Option Groups */
.option-group {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #e8f8f5;
    border-radius: 5px;
}
.option-label {
    display: block;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    border-bottom: 2px solid #e8f8f5;
    padding-bottom: 2px;
}
.option-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.type-select {
    flex: 2;
    min-width: 150px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.duration-control, .ronin-control {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    color: #555;
}
.duration-control input, .ronin-control input {
    width: 50px;
    padding: 6px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.duration-control input:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}
.ronin-control {
    margin-top: 10px;
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-flex;
}

/* Buttons */
.main-btn {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: 15px;
    background-color: #1abc9c;
    color: #fff;
}
.main-btn:hover { background-color: #16a085; }

/* Results Area */
.result-container { margin-top: 30px; padding-top: 15px; border-top: 2px solid #16a085; }
.initial-message { text-align: center; color: #7f8c8d; font-style: italic; background-color: #e8f8f5; padding: 20px; border-radius: 8px; }

/* Data Table Style for Resume */
.resume-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95em;
}
.resume-table th, .resume-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}
.resume-table th {
    background-color: #f8f9fa;
    color: #34495e;
    white-space: nowrap;
    width: 30%;
}
.resume-table tr:last-child td, .resume-table tr:last-child th {
    border-bottom: none;
}
.year-cell {
    font-weight: bold;
    color: #2c3e50;
}
.era-annotation {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-left: 5px;
}
.month-label {
    font-size: 0.85em;
    background-color: #e8f8f5;
    color: #16a085;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
}

/* Usage Notice Section */
.usage-notice-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #f8f9fa; /* オフホワイト背景 */
    border-top: 1px solid #ddd;
    border-radius: 5px;
}
.usage-notice-section h3 {
    margin: 0 0 10px 0;
    font-size: 1.0em;
    color: #34495e;
    font-weight: bold;
}
.usage-notice-section ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
    color: #555;
    font-size: 0.85em;
}
.usage-notice-section li {
    margin-bottom: 5px;
}

@media (max-width: 650px) {
    .birth-input-group { flex-wrap: wrap; }
    .input-item { min-width: 80px; }
    #birth-year { width: 100%; flex: none; }
    .resume-table th, .resume-table td {
        display: block;
        width: 100%;
    }
    .resume-table th {
        background-color: #e8f8f5;
        padding-bottom: 2px;
        border-bottom: none;
    }
    .resume-table td {
        padding-top: 2px;
    }
    .option-controls { flex-direction: column; align-items: flex-start; }
    .type-select, .duration-control { width: 100%; }

    /* Footer Mobile Adjustments */
    .footer-links-row {
        flex-direction: column;
        gap: 20px;
    }
    .footer-section {
        border-bottom: 1px dashed #556c80;
        padding-bottom: 15px;
    }
    .footer-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}