body {
    font-family: 'Roboto', 'Arial', 'Helvetica', 'Hiragino Sans', 'Meiryo', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #fafaf8;
}

footer {
    color: #333;
    text-align: center;
    padding: 1rem;
    margin-top: 20px;
}

header {
    background-color: #fff;
    text-align: center;
    padding: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
        }

.header-container {
    max-width: 960px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
        }

header h1 {
    margin: 0;
    flex-grow: 1;
    text-align: left;
    font-size: 1.3em;
        }

h2 {
        font-size: 1.2em; 
    }

    h3 {
        font-size: 1.1em; 
    }

#homeLink {
    color: #333;
    text-decoration: none;
        }

nav ul {
    padding: 0;
    list-style-type: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0;
        }

nav ul li {
    margin: 0 10px 10px 10px;
        }

nav ul li a {
    display: block;
    padding: 5px;
    text-decoration: none;
    color: #333;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    text-align: center;
        }

nav ul li a:hover {
    background-color: #e6f2ff;
    color: #004080;
        }

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-right: 0;
        }

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: #333;
    margin: 4px 0;
    transition: all 0.3s;
        }

footer p {
    margin: 0;
    font-size: 0.8em;
}

footer p a {
    color: #333;
    text-decoration: none;
    padding: 10px; 
}

.content-wrapper {
    display: flex;
    flex-grow: 1;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

main {
    display: flex;
    flex-direction: column;
    flex-grow: 0;
    width: 500px;
}

section {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 40px;
    width: 100%;
    background-color: #fff;
    color: #333;
}

aside {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-left: 40px;
    width: 380px;
    flex-shrink: 0;
    background-color: #fff;
}

aside h3, aside h4 {
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin-bottom: 10px;
    margin-top: 0;
    padding: 0;
}

section h1, section h2 {
    margin: 0;
    padding: 0;
}

.blog-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.blog-list li {
    margin-bottom: 12px;
    transition: transform 0.2s ease;
}

.blog-list li:hover {
    transform: translateX(5px);
}

.blog-list a {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 10px 15px;
    background-color: #f8f8f8;
    border-left: 4px solid #ddd;
    border-radius: 0 3px 3px 0;
    transition: all 0.3s ease;
}

.blog-list a:hover {
    color: #0066cc;
    background-color: #f0f7ff;
    border-left-color: #0066cc;
}


.two-column-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    list-style-type: none;
    padding: 0;
}

.two-column-list li {
    width: 48%; 
    margin-bottom: 8px;
}

.two-column-list li a {
    display: block;
    padding: 5px;
    text-decoration: none;
    color: #0066cc;
    background-color: #f5f5f5;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    text-align: center;
}

.two-column-list li a:hover {
    background-color: #e6f2ff;
    color: #004080;
}

.info-section {
    background-color: #fff;
    padding: 20px;
    margin: 0 auto;
    max-width: 960px;
    border: 1px solid #ddd;
    margin-top: 20px;
    color: #333;
}

.info-section ul li {
    padding: 5px 0;
}

.info-section ul li a {
    color: #004080;
    text-decoration: none;
}

form {
    display: flex;
    flex-direction: column;
    max-width: 500px; 
    margin: 0 auto; 
    color: #333;
}

label {
    margin-top: 15px;
}

input[type="number"] {
    padding: 5px;
    margin-top: 5px;
    font-size: 1.2em;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

button {
    margin-top: 15px;
    padding: 10px;
    background-color: #555;
    border-radius: 3px;
    color: #fff;
    font-size: 1em;
    border: none;
    cursor: pointer;
    outline: none; 
    -webkit-appearance: none;
    -moz-appearance: none; 
    appearance: none;
}

button:hover {
    background-color: #333;
}

.result {
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.3em;
    color: #ff0000;
}

#percentTable #percentOffTable #percentUpResult {
    width: 100%;
    height: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}


table th {
    background-color: #333;
    color: #fff;
    padding: 10px;
    text-align: center;
    font-weight: normal;
    font-size: 0.9em;
}


table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}


table tr:nth-child(even) {
    background-color: #f4f4f4;
}


table tr:hover {
    background-color: #e6f2ff;
}



@media (max-width: 1200px) {

    .header-container {
        width: 80%;
    }

    header {
        padding: 10px 0;
    }

    nav {
        display: none;
        flex-direction: column;
        align-items: left;
        background-color: #f5f5f5;
        width: 100%;
        margin: 0;
        position: absolute;
        top: 50px;
        left: 0;
        z-index: 1000;
        border-top: 1px solid #ddd;
            }

    nav.active {
        display: flex;
            }

    .menu-toggle {
        display: flex;
            }

    .menu-toggle .bar1, .menu-toggle .bar2, .menu-toggle .bar3 {
    width: 25px;
    height: 2px;
    background-color: #333;
    margin: 3px 0;
    transition: all 0.4s;
    }

    .menu-toggle.active .bar1 {
    transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active .bar2 {
    opacity: 0;
    }

    .menu-toggle.active .bar3 {
    transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .content-wrapper {
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        flex-direction: column;
    }

    main {
        order: 1;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    main section {
        width: 100%;
    }

    aside {
        order: 2;
        width: 100%;
        margin-left: 0;
        margin-bottom: 40px;
    }

    .two-column-list li {
        width: 100%;
    }

    .info-section {
        width: 80%;
    }

    h1 {
        font-size: 1.3em; 
    }

    h2 {
        font-size: 1.2em; 
    }

    h3 {
        font-size: 1.1em; 
    }
}

@media (hover: none) { 

    button:not(:active) {
        background-color: #555;
    }
}

