:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --accent-color: #eef2f6;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --success-color: #28a745;
    --radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: transparent;
}

header {
    text-align: center;
    margin-bottom: 24px;
}

header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

header p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 1.1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 10px;
    /* Reduced from 12px for better density */
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    border-color: var(--primary-color);
}

.unit {
    position: absolute;
    right: 12px;
    color: var(--text-light);
    pointer-events: none;
}

.row {
    display: flex;
    gap: 12px;
}

.col {
    flex: 1;
}

.note {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* Radio & Checkbox Styles */
.radio-group {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input,
.checkbox-label input {
    display: none;
}

.radio-custom,
.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: border-color 0.2s;
    background: #fff;
}

.checkbox-custom {
    border-radius: 4px;
}

.radio-label input:checked+.radio-custom,
.checkbox-label input:checked+.checkbox-custom {
    border-color: var(--primary-color);
}

.radio-label input:checked+.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.checkbox-label input:checked+.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: bold;
}

/* Buttons */
.action-area {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

#calc-btn {
    background-color: var(--primary-color);
    color: white;
}

#calc-btn:hover {
    background-color: var(--primary-hover);
}

#reset-btn {
    background-color: #e0e0e0;
    color: #333;
}

#reset-btn:hover {
    background-color: #d0d0d0;
}

/* Result Area */
.hidden {
    display: none;
}

.result-area {
    margin-top: 32px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--accent-color);
}

.result-row:last-child {
    border-bottom: none;
}

.result-row.header {
    font-weight: bold;
    color: var(--text-light);
    font-size: 0.9rem;
    border-bottom: 2px solid var(--accent-color);
}

.result-section {
    margin: 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
}

.result-section h3 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.subtotal {
    font-weight: bold;
    color: var(--text-color);
    justify-content: flex-end;
    gap: 16px;
    padding-top: 12px;
}

.result-row.total {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 2px solid var(--text-color);
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Info Section (Notes & Columns) */
.info-section {
    margin-top: 48px;
    border-top: 1px solid var(--border-color);
    padding-top: 32px;
}

.notes-card {
    background-color: #fff9db;
    /* 淡い黄色 */
    border: 1px solid #ffe066;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 32px;
    color: #665c28;
}

.notes-card h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #e6b800;
    /* Darker yellow/orange */
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-card p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.columns-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 600px) {
    .columns-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.column-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--accent-color);
}

.column-card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.column-card p {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 16px;
}

.column-card strong {
    color: var(--primary-color);
}

.column-card hr {
    border: none;
    border-top: 1px dashed var(--border-color);
    margin: 16px 0;
}

/* Ad Banner Placeholders */
.ad-banner {
    width: 100%;
    min-height: 100px;
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 0.9rem;
    margin: 24px 0;
    text-align: center;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.8rem;
}

.footer-links {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Long Article Content */
.long-article {
    margin-top: 48px;
    background: #fff;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.long-article h2 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 24px;
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
}

.article-content h3 {
    font-size: 1.15rem;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-color);
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 8px;
}

.article-content p {
    margin-bottom: 16px;
    line-height: 1.8;
}

.article-content ul {
    margin-bottom: 24px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}
/* --- 審査期間中のみ広告枠を非表示にする --- */
.ad-banner {
    display: none !important;
}
