@charset "UTF-8";

* {
    margin: 0;
    padding: 0;
    list-style: none;
}

body {
    font-family: "Kosugi Maru", sans-serif;
    font-weight: 400;
    margin-bottom: 0;
}

a {
    color: black;
    text-decoration: none;
}

p {
    font-size: 16px;
}

img {
    width: 100%;
}

header {
    color: #000000;
    padding: 3rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

header img {
    width: 30%;
}

#Words-list,
#modal,
#comment {
    max-width: 1280px;
    padding: 50px;
    margin: 0 auto;
}

.box {
    position: relative;
    margin: 1.9em auto 0;
    padding: 2em 4.5em;
    border-radius: 3px;
    line-height: 30px;
}

.box h3 {
    position: absolute;
    top: -2.7em;
    left: 35px;
    padding: 0.5em 2.2em;
    border-radius: 25px 25px 0 0;
    color: #fff;
}

.box p {
    margin: 0;
    color: #333;
}

/* ハンバーガーメニュー */
.hamburger {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 30px;
    cursor: pointer;
    z-index: 10;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    margin: 5px 0;
    transition: 0.4s;
}

/* メニューのスタイル */
.menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100%;
    background-color: #c0c0c0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    /* フェードインのアニメーション */
    padding: 80px 20px 0;
    box-sizing: border-box;
    z-index: 5;
}

/* メニューが開いたとき */
.menu.open {
    opacity: 1;
    pointer-events: auto;
}

/* バツ印に変わるハンバーガーボタン */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    /* 真ん中の線を透明にする */
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

footer {
    background-color: #333;
    color: #FFF;
    padding: 50px;
}

.footer__container {
    margin: 0 auto;
}

footer img {
    width: 25%;
}

.footer__caption {
    margin-top: 0;
    color: #ffffffb3;
    font-size: 16px;
    text-align: left;
}

/* nav --------------------------------------------------------------------*/
nav {
    display: block;
    position: fixed;
    top: 0;
    left: -300px;
    bottom: 0;
    width: 300px;
    background: #ffffff;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: all .5s;
    z-index: 3;
    opacity: 0;
}

.open nav {
    left: 0;
    opacity: 1;
}

nav .inner {
    padding: 25px;
}

nav .inner ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav .inner ul li {
    position: relative;
    margin: 0;
    border-bottom: 1px solid #333;
}

nav .inner ul li a {
    display: block;
    color: #333;
    font-size: 35px;
    padding: 1em;
    text-decoration: none;
    transition-duration: 0.2s;
}

nav .inner ul li a:hover {
    background: #e4e4e4;
}

/*-------------------------------------------------------------------------*/
a.pagetop {
    display: block;
    width: 50px;
    height: 50px;
    text-align: center;
    box-sizing: border-box;
    padding-top: 12px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    background-color: #333;
    color: #FFF;
    position: fixed;
    bottom: 0;
    right: 20px;
}

.toggle_btn {
    display: block;
    position: fixed;
    top: 3rem;
    right: 3rem;
    width: 30px;
    height: 30px;
    transition: all .5s;
    cursor: pointer;
    z-index: 3;
}

.toggle_btn span {
    display: block;
    position: absolute;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #333;
    border-radius: 4px;
    transition: all .5s;
}

.toggle_btn span:nth-child(1) {
    top: 4px;
}

.toggle_btn span:nth-child(2) {
    top: 14px;
}

.toggle_btn span:nth-child(3) {
    bottom: 4px;
}

.open .toggle_btn span {
    background-color: #fff;
}

.open .toggle_btn span:nth-child(1) {
    -webkit-transform: translateY(10px) rotate(-315deg);
    transform: translateY(10px) rotate(-315deg);
}

.open .toggle_btn span:nth-child(2) {
    opacity: 0;
}

.open .toggle_btn span:nth-child(3) {
    -webkit-transform: translateY(-10px) rotate(315deg);
    transform: translateY(-10px) rotate(315deg);
}

#mask {
    display: none;
    transition: all .5s;
}

.open #mask {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: .8;
    z-index: 2;
    cursor: pointer;
}

h2 {
    font-size: 50px;
    text-align: center;
    padding: 2% 0;
    color: #FFF;
}

h3 {
    text-align: center;
    padding: 0px 0 2%;
}

h4 {
    padding: 0px 0 5%;
}

.chat-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 100px 0;
}

.message {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: 75%;
}

.message.them {
    flex-direction: row;
    align-self: flex-start;
}

.message.me {
    flex-direction: row-reverse;
    align-self: flex-end;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.bubble {
    color: #000;
    padding: 14px 18px;
    border-radius: 30px;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
    word-break: break-word;
}

.message.them .bubble {
    border-bottom-left-radius: 6px;
}

.message.me .bubble {
    border-bottom-right-radius: 6px;
}

.list-grid1 .list {
    display: grid;
    margin-bottom: var(--global-space);
    background: #fff;
    color: #111;
    grid-template-rows: auto 1fr auto;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1);
}

.list-grid1 .list p {
    line-height: 1.5;
}

.list-grid1 .list figure {
    margin: -1rem;
    margin-bottom: 0.5rem;
}

.list-grid {
    display: grid;
    place-items: center;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 30px;
    padding: 80px 50px;
}

.list-grid a {
    margin: 40px 20px;
}

.heading {
    display: inline-block;
    position: relative;
    padding: 25px;
    background-color: #f5f5f5;
    color: #333333;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.3s;
}

.heading:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.heading:active {
    transform: scale(0.98);
}

.heading::before {
    position: absolute;
    bottom: 2px;
    right: -20px;
    z-index: -1;
    transform: rotate(5deg);
    width: 100%;
    height: 50%;
    background-color: #d0d0d0;
    content: "";
    filter: blur(4px);
}

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

.modal-button {
    padding: 15px 30px;
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.mask.appear {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    /* 重複していた display: block; をここに統合 */
    display: block;
}

.modal.appear {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 30px;
    font-size: 16px;
    padding: 0 50px;
}

.close-btn {
    padding: 12px 24px;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #ffd4d4;
    transform: translateY(-1px);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .modal {
        width: 95%;
        padding: 20px;
    }

    .modal p {
        font-size: 14px;
    }

    .modal-button {
        font-size: 14px;
        padding: 10px 20px;
    }
}

.modal .modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 28px;
    color: #333;
}

.modal-content {
    /* .close-btn を配置するために position: relative を追加しても良い */
    position: relative;
    text-align: center;
}

@media screen and (min-width: 1280px) {
    .scrolldown {
        bottom: 250px;
    }
}

@media screen and (max-width: 767px) {
    h2 {
        font-size: 30px;
    }

    h3 {
        font-size: 20px;
    }

    header {
        padding: 2rem;
    }

    header img {
        width: 40%;
    }

    nav {
        left: -220px;
        width: 220px;
    }

    .list-grid a {
        margin: 20px 10px;
    }

    .heading {
        padding: 15px 20px;
    }

    .heading p {
        font-size: 10px;
    }

    footer p {
        font-size: 0.5rem;
    }
}

@media screen and (max-width: 500px) {
    p {
        font-size: 14px;
    }

    header img {
        width: 85%;
    }

    #wards {
        padding: 100px 0;
    }


    .bubble p {
        font-size: 10px;
    }

    .heading {
        padding: 20px;
    }

    .list-grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        padding: 80px 0;
    }

    .toggle_btn {
        top: 2rem;
        right: 2rem;
        width: 30px;
        height: 30px;
    }

    footer img {
        width: 100%;
    }
}

@media screen and (max-width: 375px) {}