@charset "UTF-8";

:root {
    --content-width: 402px;
    --ink: #1a1a1a;
    --white: #fff;
    --mobileites: #0D8B80;
}

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

html,
body {
    min-height: 100%;
}

li {
    list-style-type: none;
}

body {
    min-width: 320px;
    color: var(--ink);
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    background:
        url("../images/footer_gradation.png") center bottom / 100% auto no-repeat,
        #e9e7e0 url("../images/body_backgraudimage.png") center top / 100% auto;
    vertical-align: bottom;
    position: relative;
}

img {
    display: block;
    max-width: 100%;
}

main {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(100%, var(--content-width));
    min-height: 100vh;
    margin: 0 auto;
    z-index: 2;
    background-color: #fff;
}

/*=========================================================
#header
=========================================================*/
header {
    position: relative;
    z-index: 3;
    height: 62px;
    background: url("../images/headerimage.png") center / cover no-repeat;
}

header h1 {
    width: 100%;
}

#header0 img {
    display: block;
    width: 100%;
    height: auto;
}

/*=========================================================
#セレクトタイトル
=========================================================*/

.section-title-wrapper {
    display: flex;
    justify-content: center;
    margin: 35px auto 42px;
    width: 100%;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.25));
}

.section-title-bg {
    /* ▼ 追加：Flexboxにすることで、中の要素が親の高さに合わせて伸びるようになります */
    display: flex;
    background: #ffffff;
    padding: 2px;
    width: min(90%, 644px);
    /* ※もし min-height: 90px; などが残っていたら削除してください */

    clip-path: polygon(14px 0,
            100% 0,
            100% calc(100% - 14px),
            calc(100% - 14px) 100%,
            0 100%,
            0 14px);
}

.section-title-text {
    /* ▼ 追加：中のテキストを上下左右中央に配置し、幅と高さを親に合わせます */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;

    background: #0D8B80;
    color: #ffffff;
    padding: 12px 20px;
    box-sizing: border-box;

    clip-path: polygon(12px 0,
            100% 0,
            100% calc(100% - 12px),
            calc(100% - 12px) 100%,
            0 100%,
            0 12px);

    text-align: center;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.4;
}

/*=========================================================
#MAP
=========================================================*/

.map-container {
    position: relative;
    width: calc(100% - 32px);
    margin: 0 auto;
    border: 2px solid #e99a25;
}

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

.map-area-buttons {
    position: absolute;
    inset: 0;
}

.map-area {
    position: absolute;
    z-index: 1;
    min-width: 70px;
    padding: 10px 12px;
    color: #111;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    cursor: pointer;
    background: rgba(255, 255, 255, .92);
    border: 0;
    border-radius: 999px;
    box-shadow: 2px 4px 7px rgba(0, 0, 0, .32);
    transform: translate(-50%, -50%);
}

.map-area:hover,
.map-area:focus-visible,
.map-area.is-active {
    outline: 3px solid #0D8B80;
    outline-offset: 2px;
    transform: translate(-50%, -50%) scale(1.05);
    z-index: 10;
    /* 他のボタンより上に表示させるために追加推奨 */
}

.other {
    top: 9%;
    left: 12%;
}

.city-hall {
    top: 25.5%;
    left: 44%;
}

.kita-hachioji {
    top: 23%;
    left: 90%;
}

.hachioji-station {
    top: 37%;
    left: 61%;
}

.nishi-hachioji {
    top: 46%;
    left: 33%;
}

.takao {
    top: 66%;
    left: 10%;
}

.katakura {
    top: 69%;
    left: 40%;
}

.kitano {
    top: 60%;
    left: 66%;
}

.tama-center {
    top: 76%;
    left: 91%;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
}

.minami-osawa {
    top: 88%;
    left: 67%;
}

/* =========================================
   エリア詳細ポップアップ
========================================= */
/* 背景の暗転と配置 */
.area-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* 画面の一番下にくっつける */
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.area-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ポップアップ本体（ボトムシート型） */
.area-popup-content {
    width: 100%;
    max-width: var(--content-width);
    /* mainの幅に合わせる */
    background-image: url('../images/arae-select/popup-background.png');
    background-size: cover;
    background-position: center top;
    border-radius: 30px 30px 0 0;
    /* 上の角だけ丸くする */
    padding: 35px 20px 50px;
    box-sizing: border-box;
    margin-bottom: 0;
    /* 下の隙間をなくす */
    position: relative;

    /* スライドインのアニメーション */
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.area-popup-overlay.active .area-popup-content {
    transform: translateY(0);
}

/* 閉じるボタン */
.area-popup-close {
    position: absolute;
    top: 15px;
    right: 25px;
    background: none;
    border: none;
    font-size: 35px;
    color: #555;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-weight: 100;
}

.area-popup-close:hover,
.area-popup-close:focus-visible {
    color: #111;
}

/* タイトル */
.area-popup-title {
    font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
    font-size: 29px;
    margin: 0 0 15px 5px;
    color: #111;
    letter-spacing: 0.05em;
    text-align: left;
}

/* マップ画像 */
.area-map-container {
    width: 100%;
    margin-bottom: 20px;
}

.area-map-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.25));
    /* 地図に少し影をつける */
}

/* 難易度などの情報枠 */
.area-info-container {
    background-image: url('../images/arae-select/area-info.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    width: 70%;
    /* 幅を少し縮めて右に寄せる */
    max-width: 280px;
    margin: 0 5px 32px auto;
    padding: 10px 15px;
    box-sizing: border-box;
    filter: drop-shadow(2px 4px 4px rgba(0, 0, 0, 0.2));
}

.area-info-text p {
    font-size: 13px;
    color: #552D19;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-family: "Zen Maru Gothic", "vdl-megamaru", "VDL-MegaMaru", "VDL メガ丸", sans-serif;
    text-align: left;
}

/* スタートボタン */
.area-start-btn-container {
    text-align: center;
}

.area-start-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--mobileites);
    /* #0D8B80 */
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    width: 94%;
    padding: 10px 10px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.2;
}

.area-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.25);
}

/* 1行目：スタンプラリーを始める */
.btn-top-text {
    font-size: 16px;
    white-space: nowrap;
}

/* 2行目：まずは八王子駅へ！ */
.btn-sub-text {
    font-size: 16px;
    white-space: nowrap;
}

/* 下線をつける箇所 */
.btn-highlight {
    font-size: 22px;
    font-weight: bold;
    text-decoration: underline;
    text-decoration-color: #fff;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}



/*=========================================================
#戻るボタン
=========================================================*/

.map-area-info {
    margin-top: 30px;
    font-size: 11px;
    color: #000;
    text-align: center;
}

.button-wrapper {
    margin-top: auto;
    padding: 32px 0 92px;
    text-align: center;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 309px;
    min-height: 51px;
    padding: 18px 30px;
    color: #0D8B80;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
    background: #fff;
    border: 2px solid #0D8B80;
    border-radius: 999px;
    box-shadow: 2px 4px 4px rgba(0, 0, 0, .3);
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn-back:hover,
.btn-back:focus-visible {
    transform: translateY(-2px);
    box-shadow: 5px 10px 10px rgba(0, 0, 0, .28);
}

@media (max-width: 480px) {
    main {
        padding-bottom: 24px;
    }

    .section-title-wrapper {
        margin: 28px auto 44px;
    }

    .section-title-bg {
        min-height: 64px;
        border-width: 3px;
    }

    .section-title {
        padding: 7px 8px;
    }

    .section-title-bg::before,
    .section-title-bg::after {
        width: 21px;
        height: 21px;
    }

    .section-title-bg::before {
        left: -13px;
    }

    .section-title-bg::after {
        right: -13px;
    }

    .map-area {
        min-width: 0;
        padding: 7px 8px;
        font-size: clamp(9px, 3.2vw, 13px);
    }

    .btn-back {
        min-height: 62px;
        border-width: 3px;
    }
}


/*=========================================================
#背景装飾
=========================================================*/
.bg-decorations {
    position: fixed;
    width: 100%;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .5;
}

.decor-img {
    position: absolute;
    display: block;
    width: 100%;
    height: auto;
}

.header-grad {
    top: 0;
    left: 0;
    width: 100%;
}