﻿:root {
    --blue: #1677ff;
    --blue-dark: #0f3d91;
    --orange: #ff9f1a;
    --bg: #f5f7fb;
    --text: #182230;
    --muted: #5f6b7a;
    --card: #ffffff;
    --line: #e6ebf2;
    --shadow: 0 12px 36px rgba(15, 61, 145, 0.08);
    --radius: 18px;
    --max: 1180px;
    --kai-green: #079000;
    --kai-green-dark: #047400;
    --kai-green-btn: #005f43;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    margin-bottom: 0;
    font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

.customer-page-back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid #dbe4f0;
    background: rgba(255, 255, 255, 0.78);
    font-weight: 700;
    color: #66758a;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(18, 58, 141, 0.06);
    transition: 0.2s ease;
    white-space: nowrap;
}

    .customer-page-back-link:hover {
        transform: translateY(-1px);
        color: #123a8d;
        border-color: #cfe0ff;
    }

.topbar .container,
.flash-wrap .container,
.hero .container,
.section .container,
.cta .container,
.footer .container,
.page-shell.container {
    width: min(var(--max), calc(100% - 32px));
    max-width: none;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}

.page-main-default {
    padding: 40px 0 64px;
}

.page-main-wide {
    min-height: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, var(--kai-green-dark) 0%, var(--kai-green) 100%);
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.nav-shell {
    min-height: 96px;
    align-items: center;
    gap: 12px 20px;
    padding: 12px 0 16px;
}

.nav-shell--landing {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
        "logo actions"
        "menu menu";
}

.nav-shell--simple {
    display: flex;
    justify-content: space-between;
}

.nav-left {
    min-width: 0;
    grid-area: logo;
}

.nav-center {
    min-width: 0;
    display: flex;
    justify-content: center;
    grid-area: menu;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

    .nav-links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px 10px;
        border-radius: 999px;
        text-align: center;
        transition: background-color .2s ease, transform .2s ease, opacity .2s ease;
        color: #fff;
        font-weight: 700;
        font-size: 18px;
        line-height: 1.2;
        flex: 0 0 auto;
        text-decoration: none;
    }

        .nav-links a:hover {
            background: rgba(0, 0, 0, 0.14);
            transform: translateY(-1px);
            color: #fff;
        }

        .nav-links a.is-active {
            background: rgba(255, 255, 255, 0.22);
            color: #fff;
        }

        .nav-links a.nav-external {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.14);
            opacity: 0.8;
        }

            .nav-links a.nav-external:hover {
                background: rgba(255,255,255,0.12);
                opacity: 1;
            }

.nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.35);
    margin: 0 8px;
    align-self: center;
}


.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 0 0 auto;
    grid-area: actions;
    justify-self: end;
}

.nav-action-form {
    margin: 0;
    display: inline-flex;
}

/* 会社TOP / お問い合わせ（常時表示用） */
.nav-common-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
}

    .nav-common-links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 10px;
        border-radius: 999px;
        text-align: center;
        transition: background-color .2s ease, transform .2s ease, opacity .2s ease;
        color: #fff;
        font-weight: 700;
        font-size: 14px;
        line-height: 1.2;
        text-decoration: none;
        white-space: nowrap;
        opacity: 0.9;
    }

        /* nav-links の nav-external とトーン合わせ */
        .nav-common-links a.nav-external {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.14);
        }

            .nav-common-links a.nav-external:hover {
                background: rgba(255,255,255,0.12);
                opacity: 1;
                transform: translateY(-1px);
            }

@media (max-width: 900px) {
    .nav-common-links {
        width: 100%;
        justify-content: center;
    }

        .nav-common-links a {
            flex: 1;
            max-width: 200px;
        }
}


.brand {
    display: flex;
    align-items: center;
    color: #fff;
    min-width: 0;
    text-decoration: none;
}

.brand-mark-real {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    min-width: 0;
}

.brand-kai-logo {
    height: 52px;
    width: auto;
    display: block;
    flex: 0 0 auto;
}

.brand-kai-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.brand-text-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-main {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    white-space: nowrap;
}

.brand-hokudai-logo {
    height: 40px;
    width: auto;
    display: block;
    flex: 0 0 auto;
}

.kai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.25s ease;
    font-size: 15px;
    white-space: nowrap;
    text-decoration: none;
}

    .kai-btn:hover {
        transform: translateY(-1px);
    }

    .kai-btn:focus,
    .kai-btn:active:focus {
        box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(21, 119, 255, 0.35);
    }

.kai-btn-outline {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
}

    .kai-btn-outline:hover {
        background: rgba(255, 255, 255, 0.18);
        color: #fff;
    }

.kai-btn-primary {
    background: linear-gradient(135deg, var(--kai-green), #0a7f32);
    color: #fff;
    box-shadow: 0 6px 14px rgba(7, 144, 0, 0.18);
}

    .kai-btn-primary:hover {
        background: linear-gradient(135deg, var(--kai-green-dark), #066a2a);
    }

.kai-btn-accent {
    background: linear-gradient(135deg, #f3b23c, #e5a12c);
    color: #fff;
    box-shadow: 0 6px 14px rgba(243, 178, 60, 0.18);
}

    .kai-btn-accent:hover {
        background: linear-gradient(135deg, #df9f2e, #c98920);
    }

.kai-btn-ghost-white {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
}

    .kai-btn-ghost-white:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.18);
    }

.flash-wrap {
    background: #fff7de;
    border-bottom: 1px solid #f0e0a3;
}

.flash {
    padding: 14px 18px;
    color: #6d5200;
    font-weight: 700;
}

.footer {
    background: #0c1830;
    color: rgba(255, 255, 255, 0.82);
    padding: 46px 0 22px;
}

.footer-layout {
    display: grid;
    grid-template-columns: minmax(280px, 1.6fr) repeat(3, minmax(150px, 1fr));
    gap: 36px;
    align-items: start;
    padding-bottom: 10px;
}

.footer-logo {
    margin-bottom: 14px;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}

.footer-brand-area p {
    margin: 0;
    max-width: 460px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.9;
}

.footer-heading {
    margin-bottom: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.footer-nav-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
}

    .footer a:hover,
    .footer a:focus {
        color: #fff;
        text-decoration: underline;
        text-underline-offset: 4px;
    }

.footer-bottom {
    margin-top: 52px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
}

@media (max-width: 900px) {
    .footer-layout {
        grid-template-columns: 1fr 1fr;
        gap: 30px 24px;
    }

    .footer-brand-area {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .footer {
        padding: 36px 0 20px;
    }

    .footer-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-logo {
        font-size: 18px;
    }

    .footer-brand-area p {
        font-size: 13px;
    }

    .footer-nav-group {
        gap: 9px;
    }

    .footer a {
        font-size: 14px;
        padding: 2px 0;
    }

    .footer-bottom {
        margin-top: 28px;
        font-size: 12px;
        line-height: 1.6;
    }
}


@media (max-width: 1320px) {
    .nav-shell {
        grid-template-columns: auto auto;
        grid-template-areas:
            "logo actions"
            "menu menu";
        gap: 16px;
    }

    .nav-center {
        justify-content: center;
    }

    .nav-actions {
        justify-self: end;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 900px) {
    .nav-shell {
        grid-template-columns: 1fr;
        grid-template-areas:
            "logo"
            "actions"
            "menu";
        gap: 14px;
    }

    .nav-left {
        justify-self: start;
    }

    .nav-actions {
        justify-self: stretch;
        width: 100%;
        flex-direction: column;
    }

        .nav-actions .kai-btn,
        .nav-actions form,
        .nav-actions form button {
            width: 100%;
        }

    .nav-links {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
    }

        .nav-links a {
            min-height: 46px;
            padding: 10px 8px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.14);
            white-space: normal;
            text-align: center;
            font-size: 14px;
        }

            .nav-links a:hover {
                background: rgba(255, 255, 255, 0.14);
                transform: none;
            }
}

@media (max-width: 640px) {
    .brand-mark-real {
        gap: 10px;
    }

    .brand-kai-logo {
        height: 40px;
    }

    .brand-main {
        font-size: 20px;
    }

    .brand-hokudai-logo {
        height: 28px;
    }

    .nav-links {
        grid-template-columns: 1fr 1fr;
    }

        .nav-links a:last-child:nth-child(odd) {
            grid-column: 1 / -1;
        }
}


.topbar--simple {
    position: sticky;
}

    .topbar--simple .nav-shell {
        min-height: 76px;
        padding: 12px 0;
    }

    .topbar--simple .nav-left,
    .topbar--simple .nav-actions {
        grid-area: auto;
    }

@media (max-width: 991.98px) {
    .nav-shell--simple {
        gap: 12px;
    }
}

@media (max-width: 767.98px) {
    .nav-shell--simple {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar--simple .nav-left {
        display: flex;
        justify-content: center;
    }

    .topbar--simple .nav-actions {
        width: 100%;
        justify-content: center;
    }
}


/* 手動ライセンス発行用ボタン */
a.btn-license-issue {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border: 1px solid #6c757d !important;
    border-radius: 0.25rem;
    background-color: transparent;
    color: #6c757d !important;
    text-decoration: none;
}

    a.btn-license-issue:hover,
    a.btn-license-issue:focus {
        background-color: #6c757d;
        color: #fff !important;
        text-decoration: none;
    }


:root {
    scroll-padding-top: 110px;
}



/* 解析ツール情報ページ用 */
.analysis-subnav {
    position: sticky;
    top: 140px;
    z-index: 40;
    margin: 0;
    padding: 0;
    background: #fff;
    border-top: 0;
    border-bottom: 1px solid #dfe8da;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

    /* Bootstrap の container 幅に引っ張られて左寄りに見えるので中央寄せを明示 */
    .analysis-subnav .analysis-subnav-inner {
        width: 100%;
        max-width: none;
        margin: 0 auto;
        padding: 0 24px;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 28px;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

        .analysis-subnav .analysis-subnav-inner::-webkit-scrollbar {
            display: none;
        }

        .analysis-subnav .analysis-subnav-inner a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 9px 14px;
            color: #435047;
            font-size: 14px;
            font-weight: 700;
            text-decoration: none;
            line-height: 1.2;
        }

            .analysis-subnav .analysis-subnav-inner a:hover,
            .analysis-subnav .analysis-subnav-inner a:focus {
                color: #047400;
            }

.mobile-menu-toggle,
.mobile-global-menu {
    display: none;
}

.analysis-subnav .analysis-subnav-inner a.is-active {
    background: #e8f5df;
    color: #2f6f35;
    border-radius: 999px;
}


@media (max-width: 768px) {
    .nav-shell--landing {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo toggle"
            "mobile mobile";
        min-height: auto;
        padding: 12px 0;
        gap: 12px;
    }

    .nav-left {
        grid-area: logo;
    }

    .nav-center,
    .nav-actions,
    .analysis-subnav {
        display: none;
    }

    .mobile-menu-toggle {
        grid-area: toggle;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 0 16px;
        border-radius: 999px;
        border: 1px solid rgba(255,255,255,0.35);
        background: rgba(255,255,255,0.12);
        color: #fff;
        font-weight: 700;
    }

    .mobile-global-menu {
        grid-area: mobile;
        width: 100%;
        padding-top: 6px;
    }

        .mobile-global-menu.show {
            display: block;
        }

    .mobile-menu-section {
        margin-top: 14px;
    }

    .mobile-menu-title {
        margin-bottom: 8px;
        color: rgba(255,255,255,0.85);
        font-size: 13px;
        font-weight: 700;
    }

    .mobile-menu-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

        .mobile-menu-grid a {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 46px;
            padding: 10px 8px;
            border-radius: 14px;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.14);
            color: #fff;
            font-size: 14px;
            font-weight: 700;
            text-align: center;
            text-decoration: none;
        }

            .mobile-menu-grid a.is-active {
                background: rgba(255, 255, 255, 0.24);
                border-color: rgba(255, 255, 255, 0.38);
            }
}
