:root {
    --primary-color: #5a5a5a; /* 濃い灰色 */
    --secondary-color: #e0e0e0; /* 明るい灰色 */
    --accent-color: #81a178; /* 緑がかったアクセント */
    --background-color: #fdfcf7; /* 和紙のような背景色 */
    --text-color: #333333;
    --font-family: 'Noto Serif JP', serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-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%3Cpath d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm13-57c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm40 42c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm13-57c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4z" fill="%23e0e0e0" fill-opacity="0.4" fill-rule="evenodd"/%3E%3C/svg%3E');
    color: var(--text-color);
    line-height: 1.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--secondary-color);
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

header p {
    font-size: 1.1rem;
    color: #777;
}

.simulation-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: start;
}

.input-area h2, .preview-area h2, .result-area-wrapper h2, .igusa-appeal h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

select, input[type="number"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    background-color: #fff;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s;
}

select:focus, input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-color);
}

.checkbox-line {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.8rem;
    width: auto;
    transform: scale(1.2);
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

.heri-note {
    text-align: center;
    margin-top: 1rem;
}

.note-group {
    text-align: center;
    margin-top: 1rem;
    max-width: 700px; /* 適度な幅に制限 */
    margin-left: auto;
    margin-right: auto;
}

.note-group .note {
    margin-bottom: 0.5rem;
}

#submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
}

#submit-btn:hover {
    background-color: #6a8562;
}

.info-box {
    background-color: #f4f4f4;
    border-radius: 5px;
    padding: 1rem;
    margin-top: 0.5rem; /* 調整 */
    border-left: 5px solid var(--accent-color);
}

.tatami-room-visual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 5px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    min-height: 300px;
    align-content: start;
}

.tatami-mat-visual {
    aspect-ratio: 2 / 1;
    background-size: cover;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.tatami-mat-visual::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 10%; /* 縁の幅 */
    background-color: #4d4d4d;
    border-left: 2px solid #222;
}

.result-area-wrapper, .igusa-appeal {
    background-color: #ffffff;
    padding: 2rem;
    margin-top: 2rem;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

#result-display {
    line-height: 2;
}

.igusa-appeal h3 {
    text-align: center;
}

.igusa-appeal p {
    text-align: justify;
}

.appeal-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.appeal-card {
    background-color: #fff;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.appeal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.appeal-card h4 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.appeal-card p {
    font-size: 0.95rem;
    line-height: 1.7;
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--secondary-color);
    color: #777;
}

.hidden {
    display: none;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
    .simulation-wrapper {
        grid-template-columns: 1fr;
    }
    .preview-area {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    header h1 {
        font-size: 2rem;
    }
    .input-area h2, .preview-area h2, .result-area-wrapper h2, .igusa-appeal h3 {
        font-size: 1.3rem;
    }
}
