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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Shippori Mincho', serif;
    background-color: #fbfbfb;
    color: #1a1a1a;
    line-height: 2.2;
    letter-spacing: 0.12em;
    animation: fadeInPage 0.8s ease-in-out;
}

body.menu-open {
    overflow: hidden;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #2f6fed;
    outline-offset: 3px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: rgba(251, 251, 251, 0.96);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.brand-link {
    display: flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 102;
}

.site-logo {
    width: 70px;
    height: 68px;
    object-fit: contain;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

.site-nav a {
    text-decoration: none;
    color: #555;
    font-size: 1.05rem;
    position: relative;
    padding-bottom: 6px;
    transition: color 0.3s;
}

.site-nav a:hover {
    color: #000;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: #1a1a1a;
    transition: width 0.4s ease, left 0.4s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
    width: 100%;
    left: 0;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 102;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #1a1a1a;
    position: absolute;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 11px; }
.hamburger span:nth-child(3) { bottom: 0; }

.section {
    padding: 120px 20px;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    background-color: #999;
    margin: 20px auto 0;
}

.lead-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #333;
}

.body-text {
    font-size: 0.95rem;
    color: #666;
}

.site-footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid #eee;
}

.required {
    color: #c62828;
}

.optional {
    color: #666;
    font-size: 0.85em;
    font-weight: normal;
}

.form-errors {
    max-width: 600px;
    margin: 0 auto 24px;
    padding: 12px 16px;
    background: #ffebee;
    color: #a01818;
    border-radius: 4px;
    text-align: left;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.attention {
    color: #c62828 !important;
}

.diagnostic-section {
    padding-top: 160px;
}

.diagnostic-lead {
    margin-bottom: 40px;
}

.diagnostic-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.question-card {
    margin-bottom: 40px;
    padding: 24px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 4px;
}

.question-card legend {
    width: 100%;
    padding: 0 0 16px;
    font-weight: 600;
    line-height: 1.8;
}

.question-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.8;
}

.question-option input {
    flex: 0 0 auto;
    margin-top: 0.45em;
}

.diagnostic-submit {
    margin-top: 40px;
    text-align: center;
}

.diagnostic-button {
    padding: 16px 48px;
    border: none;
    background: #111;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    letter-spacing: 0.15em;
}

.diagnostic-button:hover {
    background: #333;
}

.diagnostic-result {
    margin-top: 20px;
    padding: 40px 20px;
    background: #111;
    color: #fff;
    border-radius: 4px;
}

.diagnostic-result-label {
    margin-bottom: 10px;
    color: #aaa;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
}

.diagnostic-result h2 {
    margin-bottom: 10px;
    font-size: 2.2rem;
    font-weight: 400;
}

.diagnostic-result h2 span {
    color: #ff5a66;
}

.diagnostic-result h3 {
    margin-bottom: 30px;
    color: #ddd;
    font-size: 1.2rem;
    font-weight: 400;
}

.diagnostic-result > p:not(.diagnostic-result-label) {
    max-width: 500px;
    margin: 0 auto 30px;
    color: #ccc;
    font-size: 0.95rem;
    line-height: 2;
    text-align: left;
}

.diagnostic-retry {
    margin-top: 40px;
}

.diagnostic-retry a {
    color: #fff;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .site-header {
        padding: 10px 20px;
    }

    .site-logo {
        width: 50px;
        height: 48px;
    }

    .site-title {
        font-size: 1.3rem;
    }

    .hamburger {
        display: block;
    }

    .site-nav {
        position: fixed;
        inset: 0;
        width: 100vw;
        min-height: 100vh;
        min-height: 100dvh;
        background-color: #fbfbfb;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 101;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .site-nav.is-active {
        opacity: 1;
        visibility: visible;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .site-nav a {
        font-size: 1.15rem;
    }

    .hamburger.is-active span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }

    .hamburger.is-active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.is-active span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }

    .section {
        padding: 100px 18px;
    }

    .diagnostic-section {
        padding-top: 120px;
    }

    .diagnostic-result h2 {
        font-size: 1.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}
