html {
    scroll-behavior: smooth;
    overflow-x: hidden !important;
}

body {
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #0D1A2B;
    color: #fff;
    line-height: 1.8;
    overflow-x: hidden;
    box-sizing: border-box;
    overflow-x: hidden !important;
}

@font-face {
    font-family: "custom font01";
    src: url("../fonts/x12y16pxMaruMonica.woff2") format("woff2");
    src: url("../fonts/x12y16pxMaruMonica.woff") format("woff");
}

.polygon {
    font-family: "custom font01";
}

#hexCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* ← 背景にする */
    pointer-events: none;
}

/* ====== ナビゲーション修正版 ====== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10vw;
    /* ←左右paddingをvw指定で自動調整 */
    background: rgba(13, 26, 43, 0.8);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    z-index: 1000;
}

.navbar .logo {
    flex-shrink: 0;
    font-weight: 600;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.1;
    /* ←行間を詰める */
    letter-spacing: 0.05em;
    padding-top: 15px;
    /* ←上方向に余白を追加 */
}

.navbar .logo .jp {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
}

.navbar .logo .en {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: #BFC9D6;
    letter-spacing: 0.12em;
    margin-top: 0;
    /* ←余白をゼロに */
    transform: translateY(-10px);
    /* ←少しだけ上に寄せる */
}


.navbar nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    /* ← margin-leftをgapで管理 */
}

.navbar nav a {
    color: #BFC9D6;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

.navbar nav a:hover {
    color: #00C8FF;
}

/* スマホ時は縦並びや折り返し防止 */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    .navbar nav {
        gap: 12px;
    }

    .navbar nav a {
        font-size: 0.9rem;
    }
}

/* ================================
   ★ 化学メーカーっぽい光るハンバーガー
   ================================ */

/* PCでは非表示 */
.hamburger-wrap {
    display: none;
}

/* スマホ表示で ON */
@media (max-width: 1024px) {
    .navbar nav {
        display: none;
    }

    .hamburger-wrap {
        display: block;
        position: fixed;
        top: 16px;
        right: 5vw;
        z-index: 9999;
    }

    .hamburger-btn {
        width: 42px;
        height: 34px;
        position: relative;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(4px);
        border: 1px solid rgba(0, 255, 255, 0.5);
        border-radius: 8px;
        cursor: pointer;
        overflow: hidden;
        box-shadow: 0 0 12px rgba(0, 255, 255, 0.35);
        transition: 0.25s ease;
    }

    /* 光スキャン */
    .hamburger-btn::after {
        content: "";
        position: absolute;
        top: -60%;
        left: -30%;
        width: 160%;
        height: 160%;
        background: linear-gradient(120deg,
                rgba(0, 255, 255, 0) 0%,
                rgba(0, 255, 255, 0.35) 40%,
                rgba(0, 255, 255, 0) 80%);
        transform: rotate(25deg);
        animation: scanLight 4s linear infinite;
    }

    @keyframes scanLight {
        0% {
            transform: translateX(-120%) rotate(25deg);
        }

        100% {
            transform: translateX(120%) rotate(25deg);
        }
    }

    /* バー本体（発光ライン） */
    .hamburger-btn span {
        position: absolute;
        left: 8px;
        width: 26px;
        height: 3px;
        background: rgba(136, 224, 255, 0.9);
        border-radius: 3px;
        box-shadow: 0 0 8px rgba(136, 224, 255, 0.8);
        transition: 0.3s ease;
    }

    .hamburger-btn span:nth-child(1) {
        top: 7px;
    }

    .hamburger-btn span:nth-child(2) {
        top: 15px;
    }

    .hamburger-btn span:nth-child(3) {
        top: 23px;
    }

    /* 開いた時のアニメ */
    .hamburger-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

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

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

    /* ▼ 開いた時のナビメニュー ▼ */
    .mobile-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        background: rgba(0, 10, 20, 0.95);
        backdrop-filter: blur(6px);
        border-left: 1px solid rgba(0, 255, 255, 0.4);
        box-shadow: -4px 0 18px rgba(0, 255, 255, 0.2);
        padding: 80px 20px;
        display: flex;
        flex-direction: column;
        gap: 22px;
        transform: translateX(110%);
        transition: transform 0.35s ease;
        z-index: 9998;
    }

    .mobile-nav.open {
        transform: translateX(0);
    }

    .mobile-nav a {
        color: #cfefff;
        font-size: 1.2rem;
        letter-spacing: 1px;
        text-decoration: none;
        padding-bottom: 4px;
        border-bottom: 1px solid rgba(0, 255, 255, 0.25);
        transition: 0.2s ease;
    }

    .mobile-nav a:hover {
        color: #ffffff;
        text-shadow: 0 0 8px rgba(136, 224, 255, 0.9);
    }
}



/* ========== ヘッダー ========== */
header {
    position: relative;
    text-align: center;
    padding: 50px 0 100px 0;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    inset: 0;
    background: url("../img/factory_bikar.webp") center/cover no-repeat;
    animation: hueFlow 20s linear infinite alternate;
    opacity: 0.7;
}

/* .hero-image2 {
    position: absolute;
    inset: 0;
    background: url("../img/hero_image2.jpeg");
    background-color: rgba(0, 0, 0, 0.2);
    background-size: cover;
    background-position: center -100px;
    mix-blend-mode: hard-light;
    animation: hueFlow 20s linear infinite alternate;
    opacity: 0.8;
} */

@keyframes hueFlow {
    0% {
        filter: hue-rotate(0deg) brightness(0.9);
    }

    100% {
        filter: hue-rotate(360deg) brightness(1.1);
    }
}

h1 {
    font-family: "custom font01";
    font-size: 6rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px #00C8FF, 0 0 40px #88E0FF;
    animation: textGlow 8s ease-in-out infinite alternate;
}

h1::before {
    position: absolute;
    content: '';
    width: 180px;
    height: 80px;
    background-image: url(../img/logo_hakkol_red.png);
    background-size: cover;
    background-repeat: no-repeat;
    top: 72%;
    left: 53%;
}

h1::after {
    position: absolute;
    content: 'ハッコール';
    font-size: 14px;
    bottom: 0;
    left: 58%;
    transform: translateY(30px) rotate(-10deg);
    /* color: #d60e12; */
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 20px #00C8FF;
    }

    100% {
        text-shadow: 0 0 40px #FF0099;
    }
}

.subcopy {
    color: #ffffff;
    margin-top: 20px;
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.lead {
    max-width: 800px;
    margin: 60px auto 0;
    color: #ffffff;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    header {
        padding: 180px 20px 100px;
    }

    h1::before {
        width: 180px;
        height: 80px;
        top: -80px;
        left: 50%;
        transform: translateX(-50%);
    }

    h1::after {
        font-size: 0.4em;
        bottom: 95px;
        left: 54%;
        transform: translateY(30px) rotate(-10deg);
    }

    .subcopy {
        font-size: 1.2rem;
    }

    .lead {
        display: block;
    }
}

/* ===== カラーバーのベース ===== */
.wavelength-bar {
    position: relative;
    width: 100%;
    height: 50px;
    margin: 0 0 60px;
    /* ← header/section の間に最適化 */
    background: linear-gradient(to right,
            #1a1a1a 0%,
            #6a0dad 5%,
            #8000ff 10%,
            #003cff 20%,
            #00b7ff 30%,
            #00ff6a 40%,
            #a6ff00 50%,
            #ffe600 60%,
            #ff8c00 75%,
            #ff0000 90%,
            #330000 100%);
    border-radius: 6px;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
    /* 品質UP */
}

/* ====== ラベル共通 ====== */
.wavelength-bar .label {
    position: absolute;
    top: -22px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
}

/* タイトル中央 */
.wavelength-bar .label.title {
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    opacity: 0.9;
}

/* 左右 */
.wavelength-bar .label.left {
    left: 1%;
}

.wavelength-bar .label.right {
    right: 1%;
}

/* ===== 色ラベル（%配置） ===== */
.wavelength-bar .color {
    font-size: 11px;
}

.wavelength-bar .purple {
    left: 10%;
    color: #b977ff;
}

.wavelength-bar .blue {
    left: 20%;
    color: #6bb4ff;
}

.wavelength-bar .bluegreen {
    left: 30%;
    color: #66e1ff;
}

.wavelength-bar .green {
    left: 40%;
    color: #00ff9c;
}

.wavelength-bar .yellowgreen {
    left: 50%;
    color: #d7ff66;
}

.wavelength-bar .yellow {
    left: 60%;
    color: #ffeb66;
}

.wavelength-bar .orange {
    left: 75%;
    color: #ffbb55;
}

.wavelength-bar .red {
    left: 90%;
    color: #ff7777;
}

/* ===== nmラベル ===== */
.wavelength-bar .nm {
    position: absolute;
    top: 58px;
    font-size: 11px;
    font-weight: 600;
    color: #f8f8f8;
    white-space: nowrap;
}

/* nm 配置を % ベースに最適化 */
.nm380 {
    left: 1%;
}

.nm400 {
    left: 5%;
}

.nm450 {
    left: 20%;
}

.nm500 {
    left: 40%;
}

.nm600 {
    left: 75%;
}

.nm650 {
    left: 87%;
}

.nm780 {
    right: 1%;
}

/* ===== スマホ対応 ===== */
@media(max-width: 768px) {

    .wavelength-bar {
        margin: 30px 0 40px;
        height: 40px;
    }

    .wavelength-bar .label {
        font-size: 10px;
        top: -18px;
    }

    .wavelength-bar .label.title {
        top: -32px;
        font-size: 11px;
    }

    .wavelength-bar .nm {
        top: 45px;
        font-size: 10px;
    }
}


/* ===========================================
   波長バー：ゆらめき光エフェクト（安全版）
=========================================== */

/* 光のゆらめき（背景側に配置） */
.wavelength-bar::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.25), transparent 60%),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.2), transparent 70%);
    animation: shimmerMove 6s ease-in-out infinite alternate;
    z-index: 0;
    /* ← ラベルより後ろに固定 */
    pointer-events: none;
}

/* きらめく光粒 */
.wavelength-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 60%),
        radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%),
        radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 80%);
    background-size: 4px 4px, 3px 3px, 2px 2px;
    animation: sparkleFade 4s infinite ease-in-out;
    opacity: 0.4;
    z-index: 0;
    /* ← これ絶対。ラベルの下に固定 */
    pointer-events: none;
}

/* ゆらめき */
@keyframes shimmerMove {
    0% {
        opacity: 0.2;
        transform: translateX(-2%) scale(1.02);
    }

    100% {
        opacity: 0.45;
        transform: translateX(2%) scale(1.03);
    }
}

/* 粒のフェード */
@keyframes sparkleFade {
    0% {
        opacity: 0.25;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 0.25;
    }
}

/* ラベル文字だけは常に最前面へ */
.wavelength-bar .label,
.wavelength-bar .nm {
    position: absolute;
    z-index: 10;
}



/* ========== セクション共通 ========== */
section {
    padding: 100px 20px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    scroll-margin-top: 80px;
}

@media (max-width: 768px) {
    section {
        width: calc(100% - 40px);
    }
}

.section h2 {
    font-family: "custom font01";
    font-size: 2rem;
    color: #00C8FF;
    border-left: 4px solid #00C8FF;
    padding-left: 12px;
    text-align: left;
}

.subtitle {
    text-align: left;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 40px;
    background: linear-gradient(90deg, #00C8FF, #FF66CC, #FFFFFF, #00FF80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 100% 0;
    }
}

/* ===== 六角形パターン背景（about〜education） ===== */
#about,
#research,
#environment,
#education,
#person,
#message {
    position: relative;
    overflow: hidden;
}

.hex-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.06) 2px, transparent 2px),
        linear-gradient(30deg, rgba(0, 200, 255, 0.06) 12%, transparent 12%),
        linear-gradient(150deg, rgba(0, 200, 255, 0.06) 12%, transparent 12%);
    background-size: 60px 104px;
    opacity: 0.5;
    animation: hexMove 40s linear infinite;
    z-index: 0;
}

@keyframes hexMove {
    0% {
        background-position: 0 0, 0 0, 0 0;
    }

    100% {
        background-position: 300px 200px, 300px 200px, 300px 200px;
    }
}

/* セクション内容を上に浮かせる */
.section>*:not(.hex-bg) {
    position: relative;
    z-index: 1;
}

/* ===== entryセクションだけ温かい光に変更 ===== */
#entry {
    position: relative;
    background: radial-gradient(circle at top center, rgba(255, 210, 150, 0.25), rgba(0, 40, 80, 1));
}

#entry::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg,
            rgba(255, 150, 100, 0.1) 0px,
            rgba(255, 255, 200, 0.1) 2px,
            transparent 3px,
            transparent 6px);
    animation: entryLight 20s linear infinite;
    opacity: 0.4;
    z-index: 0;
}

@keyframes entryLight {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 300px 200px;
    }
}

#entry>* {
    position: relative;
    z-index: 1;
}

/* ========== 各セクションごとの演出 ========== */

/* ターゲット */
#target-sign {
    padding: 20px 20px 50px;
    width: 100%;
    background: #000;
    color: #fff;
    border: 4px solid #fff;
    box-shadow: 0 0 0 4px #000, 0 0 0 6px #fff;
    font-family: 'DotGothic16', monospace;
}

#target-title-area {
    font-size: 1.5em;
    text-align: center;
    font-weight: 900;
}

#target-list-area {
    width: 75%;
    text-align: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px 0;
    list-style-type: none;
    counter-reset: item;
}

#target-list-area>li {
    text-align: left;
    margin-bottom: 15px;
    padding: 8px 15px;
    font-size: 1.1em;
    position: relative;
    background: linear-gradient(to right,
            #1a1a1a 0%,
            #6a0dad 5%,
            #8000ff 10%,
            #003cff 20%,
            #00b7ff 30%,
            #00ff6a 40%,
            #a6ff00 50%,
            #ffe600 60%,
            #ff8c00 75%,
            #ff0000 90%,
            #330000 100%);
}

#target-list-area>li>a {
    color: white;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 8px 10px 10px 45px;
    text-decoration: none;
    text-shadow: 1px 1px 3px #003cff;
    z-index: 8;
}

#target-list-area>li::before {
    counter-increment: item;
    content: counter(item)'.';
    padding-right: 5px;
    font-weight: 900;
}

#target-list-area>li::after {
    position: absolute;
    bottom: 0px;
    right: 3px;
    content: '▼CLICK';
    font-size: 13px;
    z-index: 5;
}

#target-list-area>li:nth-of-type(1)::after {
    animation: click1 4s linear infinite;
}

#target-list-area>li:nth-of-type(2)::after {
    animation: click2 4s linear infinite;
}

#target-list-area>li:nth-of-type(3)::after {
    animation: click3 4s linear infinite;
}

@keyframes click1 {
    0% {
        bottom: 0;
    }

    25% {
        bottom: 5px;
    }

    50% {
        bottom: 0;
    }

    75% {
        bottom: 5px;
    }

    100% {
        bottom: 0;
    }
}

@keyframes click2 {
    0% {
        bottom: 5px;
    }

    25% {
        bottom: 0;
    }

    50% {
        bottom: 5px;
    }

    75% {
        bottom: 0;
    }

    100% {
        bottom: 5px;
    }
}

@keyframes click3 {
    0% {
        bottom: 2px;
    }

    25% {
        bottom: 0;
    }

    50% {
        bottom: 5px;
    }

    75% {
        bottom: 0;
    }

    100% {
        bottom: 2px;
    }
}

/* ===============================
   ▼ target-list ホバー光エフェクト
   =============================== */
#target-list-area>li {
    transition: background 0.6s ease, transform 0.25s ease;
}

#target-list-area>li:hover {
    background: linear-gradient(to right,
            #330066 0%,
            #8d0dfd 10%,
            #5f4bff 25%,
            #00eaff 40%,
            #00ff95 55%,
            #deff00 70%,
            #ff9a00 85%,
            #ff003c 100%);
    transform: translateY(-3px);
}

/* 文字を少し光らせる */
#target-list-area>li:hover>a {
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.85),
        0 0 12px rgba(0, 150, 255, 0.6);
}


@media (max-width: 768px) {
    #target-sign {
        padding: 20px 0 50px;
    }

    #target-list-area {
        width: calc(100% - 78px);
        margin: 0 0;
    }

    #target-list-area>li {
        background-color: #003cff;
        padding: 25px 7px 35px;
        font-size: 1em;
    }

    #target-list-area>li>a {
        top: 0;
        left: 0;
        width: calc(100% - 30px);
        height: 100%;
        padding: 25px 10px 10px 25px;
        /* background-color: #004477; */
    }
}

/* 会社紹介（静：光が差す） */
#about .img-box img {
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
    filter: brightness(1) contrast(1.1);
    box-shadow: 0 0 30px rgba(136, 224, 255, 0.3);
    animation: lightSweep 8s ease-in-out infinite alternate;
}

@keyframes lightSweep {
    0% {
        filter: brightness(0.9);
    }

    100% {
        filter: brightness(1.1);
    }
}

/* 研究職（動：発光粒子＋浮遊） */
#research .img-box img {
    transform: rotate(-2deg) scale(1.05);
    box-shadow: 0 0 50px rgba(0, 200, 255, 0.4);
    animation: floatImg 6s ease-in-out infinite alternate;
}

@keyframes floatImg {
    0% {
        transform: rotate(-2deg) translateY(0) scale(1.05);
    }

    100% {
        transform: rotate(-2deg) translateY(-10px) scale(1.08);
    }
}

/* ====== ギャラリー（横並び・整列修正版） ====== */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.gallery img {
    width: calc(50% - 10px);
    max-width: 420px;
    border-radius: 10px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease forwards;
}

.gallery img:nth-child(1) {
    animation-delay: 0.3s;
}

.gallery img:nth-child(2) {
    animation-delay: 0.6s;
}

.gallery img:nth-child(3) {
    animation-delay: 0.9s;
}

.gallery img:nth-child(4) {
    animation-delay: 1.2s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .gallery img {
        width: 100%;
    }
}

/* 育成体制（背景光線） */

/* ====== 育成体制：フローチャート形式 ====== */
.flowchart {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
    position: relative;
    margin: 60px 0;
    overflow: visible;
}

.step-item {
    text-align: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.circle {
    width: 90px;
    height: 90px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: linear-gradient(270deg,
            #00C8FF,
            #00FF80,
            #FFFF33,
            #FF9900,
            #FF0033,
            #9900FF,
            #FFFFFF,
            #00C8FF);
    background-size: 800% 800%;
    animation: colorShift 14s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: #0D1A2B;
    box-shadow: 0 0 25px rgba(136, 224, 255, 0.6);
    position: relative;
}

/* 発光グラデーションを自然に往復 */
@keyframes colorShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.step-title {
    font-weight: 600;
    color: #E8EDF3;
    font-size: 1.3rem;
    margin-top: 10px;
}

.step-contents {
    font-weight: normal;
    text-align: left;
    padding: 13px 20px;
    background: #000;
    color: #fff;
    border: 4px solid #fff;
    box-shadow: 0 0 0 4px #000, 0 0 0 6px #fff;
    font-family: 'DotGothic16', monospace;
}

.step-contents>span {
    display: block;
    padding-left: 1em;
    text-indent: -1em;
}

/* 矢印部分 */
.arrow {
    flex: 0 0 50px;
    margin: 50px;
    height: 3px;
    background: linear-gradient(90deg, rgba(0, 200, 255, 0.8), rgba(255, 255, 255, 0.4));
    position: relative;
    animation: arrowGlow 2s ease-in-out infinite alternate;
}

.arrow::after {
    content: "";
    position: absolute;
    right: -10px;
    top: -3.8px;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid rgba(0, 200, 255, 0.9);
}

@keyframes arrowGlow {
    0% {
        opacity: 0.6;
        box-shadow: 0 0 8px rgba(0, 200, 255, 0.4);
    }

    100% {
        opacity: 1;
        box-shadow: 0 0 16px rgba(136, 224, 255, 0.8);
    }
}

/* スマホ対応（縦方向） */
@media (max-width: 768px) {
    .flowchart {
        flex-direction: column;
        align-items: center;
    }

    .arrow {
        width: 3px;
        height: 40px;
        background: linear-gradient(180deg, rgba(0, 200, 255, 0.8), rgba(255, 255, 255, 0.4));
        margin: 15px 0;
    }

    .arrow::after {
        right: auto;
        left: -6px;
        top: auto;
        bottom: -10px;
        border-top: 10px solid rgba(0, 200, 255, 0.9);
        border-left: none;
        border-right: 6px solid transparent;
        border-left: 6px solid transparent;
    }
}

/* 人物像（ブラー背景＋浮き上がり） */
#person {
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.3), transparent);
    backdrop-filter: blur(4px);
}

#person .img-box img {
    border-radius: 10px;
    filter: brightness(1.05) drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
    transform: scale(1);
    transition: transform .6s ease;
}

#person .img-box img:hover {
    transform: scale(1.05);
}

/* メッセージ（女性取締役：円形＋光） */
#message .img-box {
    text-align: center;
}

#message .img-box img {
    border-radius: 50%;
    width: 260px;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.4);
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 70%);
    animation: pulseLight 6s ease-in-out infinite alternate;
}

@keyframes pulseLight {
    0% {
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    }

    100% {
        box-shadow: 0 0 50px rgba(136, 224, 255, 0.6);
    }
}

/* ====== エントリーボタン（7色放射アニメーション） ====== */
#entry a {
    display: inline-block;
    position: relative;
    padding: 15px 60px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 40px;
    text-decoration: none;
    color: #fff;
    background: radial-gradient(circle, #00C8FF, #004477);
    box-shadow: 0 0 25px rgba(0, 200, 255, 0.5);
    overflow: hidden;
    transition: transform 0.3s ease;
}

#entry a::before {
    content: "";
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg,
            #00C8FF,
            #00FF80,
            #FFFF33,
            #FF9900,
            #FF0033,
            #9900FF,
            #FFFFFF,
            #00C8FF);
    animation: rotateColors 6s linear infinite;
    z-index: 0;
    filter: blur(12px);
    opacity: 0.7;
}

#entry a span {
    position: relative;
    z-index: 2;
}

@keyframes rotateColors {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#entry a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.8);
}

/* フッター（静止グラデーション） */
footer {
    background: linear-gradient(180deg, #0D1A2B 0%, #1B3C6D 100%) url("footer_bg.jpg") no-repeat center/cover;
    color: #BFC9D6;
    text-align: center;
    padding: 40px 20px;
}

footer a {
    text-decoration: none;
    color: white;
}

@media (max-width: 768px) {
    footer {
        padding: 40px 20px 230px 20px;
    }
}

/* 共通レイアウト */
.with-image {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

.with-image .img-box {
    flex: 1 1 40%;
    position: relative;
}

.with-image .img-box img {
    width: 100%;
    border-radius: 10px;
}

.text-box {
    flex: 1 1 55%;
}

.list-strong>li {
    font-size: 120%;
    color: #FF0099;
}

/* キャラ */
.character {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 260px;
    z-index: 10;
    transition: opacity 0.5s ease;
    filter: drop-shadow(0 0 10px rgba(136, 224, 255, 0.6));
}

@media(max-width:768px) {

    h1 {
        font-size: 2.2rem;
    }

}

.speech-bubble {
    position: fixed;
    bottom: 320px;
    right: 60px;
    max-width: 240px;
    padding: 12px 16px;
    border-radius: 14px;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), rgba(136, 224, 255, 0.7));
    color: #0D1A2B;
    /* fsont-family: "Comic Sans MS", "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", sans-serif; */
    font-family: "custom font01";
    /* font-size: 0.95rem; */
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 0 15px rgba(136, 224, 255, 0.6);
    animation: bubbleGlow 6s ease-in-out infinite alternate;
    z-index: 11;
    transition: opacity 0.6s ease;
}

.speech-bubble::after {
    content: "";
    position: absolute;
    bottom: -12px;
    right: 40px;
    border-width: 12px 10px 0;
    border-style: solid;
    border-color: rgba(136, 224, 255, 0.7) transparent transparent transparent;
    filter: drop-shadow(0 0 6px rgba(136, 224, 255, 0.4));
}

@keyframes bubbleGlow {
    0% {
        box-shadow: 0 0 10px rgba(136, 224, 255, 0.3);
    }

    100% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.7);
    }
}

/* ===== キャラクター＆吹き出し スマホ調整 ===== */
.character {
    position: fixed;
    bottom: 50px;
    right: 50px;
    width: 220px;
    height: auto;
    z-index: 10;
    transition: transform 0.3s ease;
}

/* ▼ キャラ下のボイス切り替えスイッチ */
.voice-toggle-btn {
    position: fixed;
    bottom: 13px;
    right: 40px;
    padding: 5px 20px;
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid #4aa3ff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    z-index: 15;
}

.voice-toggle-btn>span:first-child {
    display: block;
    font-size: 0.8em;
}

.voice-toggle-btn>span:last-child#voice-off {
    color: #004477;
    text-shadow: 0.3px 0.3px 3px rgba(255, 255, 255, 0.85);
}

.voice-toggle-btn>span:last-child#voice-on {
    color: #00ff6a;
    text-shadow: 0.3px 0.3px 3px rgba(50, 50, 50, 0.85);
}

@media (max-width: 768px) {

    .character {
        display: block !important;
        /* ← 非表示を解除 */
        transform: scale(0.6);
        bottom: 0;
        right: 0;
        width: 200px;
    }

    /* .speech-bubble {
        transform: scale(0.8);
        bottom: 150px;
        right: 20px;
        max-width: 200px;
    } */

    .speech-bubble {
        transform: scale(0.8);
        bottom: 75px;
        right: auto;
        left: 10px;
        max-width: 65vw;
        min-width: auto;
    }

    .speech-bubble>br {
        display: none;
    }

    .speech-bubble::after {
        bottom: 20px;
        right: -15.5px;
        transform: rotate(-90deg);
    }

    .voice-toggle-btn {
        bottom: 13px;
        right: auto;
        left: 40px;
    }

}


/* ================================
    プロフィールポップアップ
================================ */
#character-profile {
    position: fixed;
    bottom: 55px;
    right: 40px;
    z-index: 10;
    background-color: #4aa3ff;
    color: #fff;
    text-shadow: 1px 1px 3px #003cff;
    padding: 2px 10px;
    border: 5px double rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    cursor: pointer;
    text-align: center;
    font-size: 13px;
}

#character-profile>span:last-child {
    display: block;
    text-align: center;
    font-size: 1em;
    position: relative;
}

#character-profile>span:last-child::before,
#character-profile>span:last-child::after {
    position: absolute;
    content: '';
}

#character-profile>span:last-child::before {
    top: -22px;
    right: -10px;
    width: 8px;
    height: 12px;
    clip-path: polygon(0 0, 40% 0, 40% 100%, 0 100%);
    transform: rotate(25deg);
    background-color: #00ff6a;
}

#character-profile>span:last-child::after {
    top: -18px;
    right: -18px;
    width: 8px;
    height: 13px;
    clip-path: polygon(0 0, 40% 0, 40% 100%, 0 100%);
    transform: rotate(45deg);
    background-color: #00b7ff;
}


#profile-area {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.35s ease;
    z-index: 9999;
}

#profile-area.open {
    opacity: 1;
    visibility: visible;
}

#profile-area dl {
    box-sizing: border-box;
    max-width: 90%;
    min-width: 420px;
    padding: 25px 40px;
    background: #000;
    border: 3px solid #fff;
    box-shadow: 0 0 0 6px #000,
        0 0 0 8px #fff;
    font-family: 'DotGothic16';
    color: #fff;
    animation: popOpen 0.3s ease-out;
}

#profile-area dl dd {
    width: 100%;
    /* background-color: #00b7ff; */
    margin-left: 0;
}

@keyframes popOpen {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    #character-profile {
        bottom: 0;
        right: 40px;
        color: #fff;
    }

    /* ▼ 黒背景は全画面のまま（閉じるトリガー維持） */
    #profile-area {
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: 0.35s ease;
        z-index: 9999;
        padding: 20px 0;
        /* ←上下にスペースを作り、黒背景がタップ可能に */
    }

    /* ▼ ポップアップ本体（dl）を画面の半分に縮める */
    #profile-area dl {
        max-height: 50vh;
        /* ←ここが重要。高さを画面の50%に */
        overflow-y: auto;
        /* ←中身だけスクロール */
        -webkit-overflow-scrolling: touch;
        /* スマホで滑らかスクロール */
    }
}


/* ===== 黄金ミッションフレーム（DQ風オリジナル） ===== */

.dq-frame-wrap {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto 6px auto;
    /* ← MAPとの距離を詰める */
    text-align: center;
}

.dq-frame {
    display: inline-block;
    position: relative;
    padding: 14px 40px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 4px solid #e6c555;
    border-radius: 12px;

    /* 黄金の立体化（ハイライト × 影） */
    box-shadow:
        0 0 0 4px #000,
        0 0 0 8px #e6c555,
        inset 0 0 8px rgba(255, 255, 200, 0.4),
        0 6px 20px rgba(0, 0, 0, 0.4);
}

.dq-frame-title {
    font-family: "DotGothic16", sans-serif;
    font-size: 22px;
    color: #ffeaa7;
    text-shadow:
        1px 1px 0 #000,
        0 0 6px rgba(255, 255, 150, 0.6);
}

/* フレーム角（彫刻風） */
.dq-frame::before,
.dq-frame::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #b48a2a, #f5d97c, #c9a341);
    border: 3px solid #000;
    border-radius: 4px;
}

.dq-frame::before {
    top: -12px;
    left: -12px;
}

.dq-frame::after {
    bottom: -12px;
    right: -12px;
}

/* 説明文 */
.dq-frame-sub {
    font-family: "DotGothic16", sans-serif;
    margin-top: 15px;
    font-size: 14px;
    color: #fff;
    opacity: 0.9;
}

/* SP調整 */
@media screen and (max-width: 600px) {
    .dq-frame {
        padding: 10px 26px;
    }

    .dq-frame-title {
        font-size: 18px;
    }

    .dq-frame-sub {
        font-size: 13px;
    }
}




/* ===== ドラクエMAPセクション ===== */

/* =======================================
   ドラクエMAP：PC/SP共通 % 座標ホットスポット
   元画像サイズ：1500 × 1601
   ※px指定は完全に撤廃
======================================= */

/* MAP画像 */
.dq-map-container {
    position: relative;
    width: 100%;
}

.dq-map-image {
    width: 100%;
    display: block;
}

.dq-map-image>img {
    width: 100%;
    object-fit: cover;
}

.dq-hotspot {
    position: absolute;
    background: rgba(255, 0, 0, 0);
    /* 完全透明 */
    border: none;
    cursor: pointer;
}



/* ===== ドラクエ風ポップアップ ===== */

#dqPopup {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: 90%;
    max-width: 900px;

    max-height: 80vh;
    /* ← 高さ上限をつける */
    overflow-y: auto;
    /* ← 中だけスクロール */

    background: #000;
    color: #fff;
    padding: 0;
    border: 4px solid #fff;
    box-shadow: 0 0 0 4px #000, 0 0 0 6px #fff;
    display: none;
    font-family: 'DotGothic16', monospace;
    font-family: "custom font01";
    font-size: 18px;
    font-weight: bold;
    z-index: 9999;
}


.dq-popup-inner {
    padding: 16px;
}

#closePopup {
    margin-top: 14px;
    padding: 6px 18px;
    background: #222;
    color: #fff;
    border: 2px solid #fff;
    cursor: pointer;
    font-family: 'DotGothic16', monospace;
    font-family: "custom font01";
}

/* 画像エリア */
.dq-popup-images {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.dq-popup-images img {
    width: 32%;
    border: 2px solid #fff;
    object-fit: cover;
}

/* スマホ：縦並び */
@media screen and (max-width: 600px) {
    .dq-popup-images img {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .dq-map-container {
        position: relative;
        width: 100% !important;
        overflow-x: hidden !important;
    }
}


/* ==========================
   DEBUG：ホットスポット可視化
   ========================== */

/* デバッグON時 */
.dq-debug .dq-hotspot {
    outline: 2px solid red;
    background: rgba(255, 0, 0, 0.15);
}

/* ホバー時にさらに強調 */
.dq-debug .dq-hotspot:hover {
    outline: 3px solid #00ffea;
    background: rgba(0, 255, 234, 0.25);
}


/* ============================
   募集職種紹介セクション
============================ */

.recruit-section {
    margin-top: 80px;
    text-align: center;
}

.recruit-tabs {
    width: calc(100% - 40px);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.recruit-tab {
    padding: 10px 18px;
    background: transparent;
    border: 2px solid #1a2955;
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.recruit-tab.active,
.recruit-tab:hover {
    background: #1a2955;
    color: #fff;
}

.recruit-content {
    display: none;
    margin-top: 20px;
}

.recruit-content.active {
    display: block;
}

.recruit-table {
    width: calc(100% - 40px);
    table-layout: fixed;
    max-width: 900px;
    margin: 0 0 20px 0;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.recruit-table tr:first-child th:first-child {
    border-top-left-radius: 0;
}

.recruit-table tr:first-child th:last-child {
    border-top-right-radius: 0;
}

.recruit-table th {
    width: 30%;
    background: #1a2955;
    color: #fff;
    padding: 14px;
    text-align: left;
    border-bottom: 2px solid #fff;
}

.recruit-table td {
    padding: 14px;
    border-bottom: 1px solid #ddd;
    color: #333;
    text-align: left;
}

.recruit-table tr:last-child th,
.recruit-table tr:last-child tr {
    border: none;
}

.strong-point {
    font-weight: bold;
    font-size: 18px;
    text-decoration: underline;
    color: #16529b;
}

.entry-btn {
    display: inline-block;
    background: #1a2955;
    color: #fff;
    padding: 12px 26px;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.3s;
}

.entry-btn:hover {
    opacity: 0.8;
}

/* ▼ Recruit セクションだけ、float の影響を完全リセットする */
#recruit {
    clear: both !important;
    width: 100%;
}

/* ▼ h2 と subtitle の正しい縦配置を強制 */
#recruit h2 {
    display: block;
    width: 100%;
    float: none !important;
    margin-bottom: 6px;
    /* 他セクションと揃える */
}

#recruit .subtitle {
    display: block;
    float: none !important;
    margin-top: 0 !important;
    /* 本来の位置に戻す */
    text-align: left;
    /* 念のため */
}

/* ▼ Recruit セクションのタブ領域も float の残留を受けないように保護 */
#recruit .tab-container,
#recruit .tab-buttons,
#recruit .tab-content {
    clear: both !important;
    float: none !important;
    width: 100% !important;
    display: block;
}

/* ▼▼ スマホ時：タブを折り返し縦方向に ▼▼ */
@media (max-width: 768px) {
    .recruit-tabs {
        display: flex;
        flex-wrap: wrap;
        /* ← 折り返し有効 */
        gap: 12px;
    }

    .recruit-tab {
        flex: 1 1 100%;
        /* ← ボタン幅を100%に */
        font-size: 0.9rem;
        width: calc(50% - 50%);
        padding: 10px 12px;
        white-space: nowrap;
        text-align: center;
    }
}

/* ▼▼ スマホ時：採用テーブルを1列化 ▼▼ */
@media (max-width: 768px) {

    .recruit-table,
    .recruit-table tr,
    .recruit-table th,
    .recruit-table td {
        display: block;
    }

    .recruit-table {
        width: calc(100% - 40px);
    }

    .recruit-table tr {
        margin-bottom: 18px;
        padding-bottom: 10px;
    }

    .recruit-table th {
        font-size: 1rem;
        margin-bottom: 6px;
        color: #00C8FF;
        width: calc(100%);
    }

    .recruit-table td {
        padding: 20px 20px 0 20px;
        width: calc(100% - 40px);
        border-bottom: none;
    }
}

/* ============================
   CTAセクション
============================ */
.lab_ad {
    display: block;
    width: 50%;
    position: relative;
    margin-bottom: 30px;
}

.lab_ad::before {
    position: absolute;
    content: '★.。研究者が気になる自慢のラボ見学も随時受付中。.★';
    text-align: center;
    border: 3px double white;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 50px;
    color: white;
    font-weight: bold;
    transform: translateX(-50%);
    z-index: 2;
    padding: 20px 0 0 0;
}

.lab_ad::after {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100px - 27px);
    background: rgba(45, 248, 10, 0.5);
    z-index: 1;
}

@media (max-width: 768px) {
    .lab_ad {
        width: 100%;
    }
}