body {
    font-family: "Orbitron", Arial, Helvetica, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.ic {
    z-index: 9999;
    font-weight: 200;
    font-family: sans-serif;
    background-color: rgba(255, 255, 255, 0.679);
    font-size: 120%;
    color: white;
    text-shadow: black 3px 1px 3px;
    position: fixed;
    margin: 0;
    top: 0%;
    left: 0%;
    padding: 1%;
}

#pc-link {
    display: block;
}

#phone-link {
    display: none;
}

.hed0 {
    background-image: url(../img/h1-1.png);
    background-size: cover;
    height: 100vh;
    font-size: 120%;
    overflow: hidden;
}

.hed0 img {
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

.hed0 h1 {
    margin: 0;
    color: #000000;
    text-shadow: #ffffff 3px 2px 3px;
    font-family: 'Sawarabi Mincho';
    border-bottom: 3px #959595 solid;
    padding-left: 10%;
    padding-right: 20%;
    bottom: 10px;
    z-index: 500;
    font-weight: 400;
    position: absolute;
    bottom: 50%;
    right: 0;
}

.main {
    background: #ffffff;
    font-family: 'Sawarabi Mincho';
    padding: 2% 3%;
    overflow: hidden;
}

.main h2 {
    margin: 0;
}

.main p {
    margin: 0;
}

.main img {
    width: 10%;
    padding-right: 2%;
    float: right;
    pointer-events: none;
}

#eng .r-logo {
    margin-left: -4%;
    margin-bottom: 1%;
    padding-right: 50%;
    width: 50%;
    float: none;
}

#update {
    font-size: 140%;
    text-align: center;
}

#gaiyou {
    background-color: #000000;
    color: white;
}

#dev {
    background-color: #dfdfdf;
    background-image: url(../img/bg_head1.png);
    background-repeat: no-repeat;
    background-position: right top;
    color: #333;
    text-shadow: #fff 2px 2px 2px;
    padding-bottom: 0%;
}

.devi {
    background-image: url(../img/dev2.png);
    background-size: 20%;
    background-repeat: no-repeat;
    background-position: right bottom;
    padding-bottom: 3%;
}

#hdeu {
    float: left;
    width: 45%;
}

#hdeu1 {
    float: right;
    width: 45%;
    margin-left: 4%;
}

#eng {
    background-image: url(../img/bg_head.png);
    background-repeat: no-repeat;
    background-position: right top;
    display: flex;
    flex-wrap: wrap;
}

#eng p {
    width: 50%;
}

#gaiyou {
    background-image: url(../img/bg_head1.png);
    background-repeat: no-repeat;
    background-position: right top;
}

.links {
    padding: 1% 1% 0% 1%;
    line-height: 5px;
    font-size: 120%;
    display: inline-block;
    color: #008eec;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease;
}

.links::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #008eec;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease, transform-origin 0s;
}

.links:hover {
    /* color: #ddd; */
    font-weight: bold;
    /* text-shadow: 1px 3px 3px rgba(0, 2, 150, 0.712); */
}

.links:hover::after {
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.4s ease, transform-origin 0s;
}

@media screen and (max-width: 590px) {
    body {
        font-family: "Orbitron", Arial, Helvetica, sans-serif;
        margin: 0;
        overflow-x: hidden;
    }

    .ic {
        display: none;
    }

    .hed0 {
        background-image: url(../img/h1-1.png);
        background-size: cover;
        height: min-content !important;
        font-size: 100%;
        overflow: hidden;
    }

    .hed0 img {
        overflow: hidden;
        height: auto;
        width: 100%;
        z-index: 10;
        pointer-events: none;
    }

    .hed0 h1 {
        margin: 0;
        height: max-content !important;
        color: #000000;
        text-shadow: #ffffff 3px 2px 3px;
        font-family: 'Sawarabi Mincho';
        border-bottom: none;
        padding-left: 5%;
        padding-right: 5%;
        top: 10%;
        z-index: 500;
        font-weight: 400;
        position: absolute;
        left: 0;
    }

    #pc-link {
        display: none;
    }

    #phone-link {
        display: block;
        font-size: 100%;
        padding-right: 0%;
    }

    .main {
        background: #ffffff;
        font-family: 'Sawarabi Mincho';
        padding: 2% 3%;
        font-size: 90%;
        overflow: hidden;
    }

    .main h2 {
        margin: 0;
    }

    .main p {
        margin: 0;
    }

    .main img {
        width: 10%;
        padding-right: 0%;
        float: right;
        pointer-events: none;
    }

    .main .r-logo {
        margin-left: -4%;
        padding-right: 0%;
        margin-bottom: 1%;
        width: 95%;
        float: none;
    }

    #eng .r-logo {
        margin-left: -4%;
        padding-right: 0%;
        margin-bottom: 1%;
        width: 95%;
        float: none;
    }

    #update {
        font-size: 100%;
        padding: 3%;
    }

    #gaiyou {
        background-color: #000000;
        color: white;
        background-size: 50%;
        background-image: url(../img/bg_head1.png);
        background-size: 10%;
        background-repeat: no-repeat;
        background-position: right top;
        padding-bottom: 10%;
    }

    #gaiyou img {
        margin-top: 30px;
    }

    #dev {
        background-color: #dfdfdf;
        background-size: 50%;
        background-image: url(../img/bg_head1.png);
        background-size: 10%;
        background-repeat: no-repeat;
        background-position: right top;
        padding-bottom: 0%;
    }

    .devi {
        background-image: url(../img/dev2.png);
        background-size: 50%;
        background-repeat: no-repeat;
        background-position: right bottom;
        padding-bottom: 3%;
    }

    #hdeu {
        float: right;
        width: 100%;
    }

    #hdeu1 {
        float: right;
        width: 100%;
    }

    #eng {
        background-image: url(../img/bg_head.png);
        background-size: 10%;
        background-repeat: no-repeat;
        background-position: right top;
        padding-bottom: 10%;
    }

    #eng p {
        width: 100%;
    }

    .links {
        padding: 1% 1% 0% 1%;
        line-height: 35px;
        font-size: 140%;
        display: inline-block;
        color: #008eec;
        text-decoration: none;
        position: relative;
        overflow: hidden;
        transition: color 0.3s ease;
    }

    .links::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 1px;
        background-color: #008eec;
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.4s ease, transform-origin 0s;
    }

    .links:hover {
        /* color: #ddd; */
        font-weight: bold;
        /* text-shadow: 1px 3px 3px rgba(0, 2, 150, 0.712); */
    }

    .links:hover::after {
        transform: scaleX(1);
        transform-origin: left;
        transition: transform 0.4s ease, transform-origin 0s;
    }
}

@media (max-width: 896px),
(pointer: coarse) {

    /* 896px以下 または タッチデバイス（ほぼスマホ） */
    .hed0::before,
    .hed0::after,
    .star {
        display: none !important;
    }
}

/* 粒子コンテナ */
.hed0::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 8%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent transparent 10%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 6%);
    animation: floatStars 30s linear infinite;
}

/* たくさんの小さな星（粒子） */
.hed0::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #fff, transparent),
        radial-gradient(1px 1px at 40px 70px, #fff, transparent),
        radial-gradient(2px 2px at 90px 10px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(1px 1px at 10px 100px, #fff, transparent),
        radial-gradient(2px 2px at 160px 40px, #fff, transparent),
        radial-gradient(5px 3px at 70px 120px, #fff, transparent),
        /* 以下好きなだけ追加（20〜50個くらいがちょうどいい） */
        radial-gradient(1px 1px at 50px 10px, #fff, transparent),
        radial-gradient(2px 2px at 110px 90px, #fff, transparent),
        radial-gradient(1px 1px at 30px 50px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 150px;
    /* これで星がゆっくり流れる */
    animation: drift 15s linear infinite;
    opacity: 1;
}

@keyframes drift {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 200px 150px;
    }
}

@keyframes floatStars {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(30px, -30px) rotate(360deg);
    }
}