/* =========================================================
   基本設定
   ========================================================= */

/* 
  可変フォントサイズ
  375px〜430px あたりのスマホ幅で自然に伸縮するように設定
*/
:root {
    --fs-sm: clamp(0.70rem, -0.49rem + 4.5vw, 0.875rem);
    --fs-base: clamp(0.80rem, -0.56rem + 5.5vw, 1rem);
    --fs-md: clamp(0.90rem, -0.63rem + 6.5vw, 1.125rem);
    --fs-lg: clamp(1.00rem, -0.70rem + 7vw, 1.25rem);
    --fs-xl: clamp(1.15rem, -1.23rem + 10vw, 1.50rem);
    --fs-2xl: clamp(2.00rem, -1.41rem + 14.5vw, 2.50rem);
}


/* =========================================================
   ページ全体
   ========================================================= */

main {
    margin-top: 66px;
    /* ヘッダー分の余白 */
    position: relative;
    font-family: YakuHanJP, "Noto Sans JP" !important;
    font-style: normal;
}

/* 段落テキスト共通 */
p {
    font-size: var(--fs-md);
    font-weight: 550;
}

/* メインコンテンツ幅（スマホ寄りの最大幅） */
.page-content {
    width: unset;
    max-width: 430px;
    padding-bottom: 0;
}


/* =========================================================
   背景
   ========================================================= */

/* 
  ページ全体に固定背景を敷く
  画像 + 背景色
*/
main::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--image-bg);
    background-size: cover;
    background-repeat: no-repeat;
    background-color: var(--color-main);
    z-index: -2;
}

/* 
  500px以上でも同じ背景設定
  ※ 現状はほぼ同じ内容なので統合可能
*/
@media (min-width: 500px) {
    main::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        background: var(--image-bg);
        background-size: cover;
        background-repeat: no-repeat;
        background-color: var(--color-main);
        z-index: -2;
    }
}


/* =========================================================
   レイアウト補助
   ========================================================= */

.content-holder {
    position: relative;
}


/* =========================================================
   新幹線画像エリア
   ========================================================= */

.shinkansen {
    position: relative;
    top: 20px;
    left: 20px;
}

.shinkansen img {
    width: 380px;
    left: 20px;
    height: auto;
    z-index: 2;
}


/* =========================================================
   見出し・タイトル系
   ========================================================= */

/* 場所名表示 */
.placeName {
    align-items: center;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* タイトル風テキスト */
.titleText {
    display: flex;
    align-items: center;
    text-align: left;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    margin-left: 10px;
}

/* 説明文 */
.itemDescription {
    text-align: left;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 15px;
    padding: 10px;
}

/* placeName 内のアイコン(svg) */
.placeName svg {
    margin-top: 1px;
    margin-right: 10px;
    width: 18px;
    z-index: 10;
}


/* =========================================================
   リスト系
   ========================================================= */

/* 通常の ul */
ul {
    margin: 0;
    padding: 0;
    font-size: var(--fs-sm);
    list-style: none;
    -webkit-font-feature-settings: 'palt' 1;
    font-feature-settings: 'palt' 1;
}

/* 注意書き用リスト */
ul.caution {
    margin: 20px 0 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--fs-sm);
    -webkit-font-feature-settings: 'palt' 1;
    font-feature-settings: 'palt' 1;
}

/* 各注意書き項目 */
ul.caution li {
    position: relative;
    padding: 0 0 0 1.1em;
    list-style: none;
}

/* 行頭に「※」を付ける */
ul.caution li::after {
    position: absolute;
    display: block;
    content: "※";
    top: 0;
    left: 0;
}


/* =========================================================
   交換場所・ロケーション情報
   ========================================================= */

.location-info {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.location-title {
    text-align: center;
    margin-bottom: 20px;
}

/* 上下の余白用 */
.spacer {
    margin: 20px 0;
}

/* ラベル + 値 の2列表示 */
.location-details {
    display: flex;
    margin-bottom: 10px;
    text-align: left;
}

/* 左カラム（ラベル） */
.detail-label {
    min-width: 100px;
    font-size: 14px;
    font-weight: 600;
    text-align: justify;
    text-align-last: justify;
}

/* 右カラム（内容） */
.detail-value {
    margin-left: 10px;
    flex-grow: 1;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* detail-value 内のリンク */
.detail-value a {
    text-decoration: underline;
    color: inherit;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: inline-block;
    max-width: 100%;
}

.detail-value a:hover {
    color: #007BFF;
}


/* =========================================================
   サムネイル画像一覧
   ========================================================= */

/* 3列 × 3段想定 */
.thumbnails-container {
    display: grid;
    grid-template-columns: repeat(3, 30%);
    grid-template-rows: repeat(3, auto);
    grid-gap: 0 10px;
    justify-content: center;
    padding: 10px;
}

/* 各サムネイル枠 */
.thumbnail {
    width: 100%;
    height: auto;
    overflow: hidden;
    margin-bottom: 10px;
}

.thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* 3列 × 2段想定 */
.thumbnails-container2 {
    display: grid;
    grid-template-columns: repeat(3, 30%);
    grid-template-rows: repeat(2, auto);
    grid-gap: 10px;
    justify-content: center;
    padding: 0 10px;
}


/* =========================================================
   コード表示・コピーボタン
   ========================================================= */

/* コード表示ボックス */
.code-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 2px solid var(--color-tokai);
    border-radius: 10px;
    padding: 12px 16px;
    max-width: 600px;
    margin: 10px auto;
}

/* コード文字列 */
.code-text {
    font-family: var(--font-code);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-tokai);
    background: #f8f8f8;
    padding: 4px 8px;
    border-radius: 4px;
    word-break: break-all;
}

/* コピーボタン */
.copyButton {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem;
    background: var(--color-tokai);
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.copyButton:hover {
    background: var(--color-tokai);
}

.copy-icon {
    width: 16px;
    height: 16px;
}


/* =========================================================
   フッター
   ========================================================= */

footer {
    background-color: #fff;
    padding: 10px;
    text-align: center;
    width: auto;
    margin: auto;
    position: relative;
    height: auto;
    overflow-x: hidden;
    margin-top: 20px;
}

.footer-content {
    width: 96%;
    margin: 0 auto;
}

.footer-content h2 {
    margin-bottom: 5px;
    font-size: 1em;
}

/* フッター内の会社情報など */
.info-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.logo-text {
    display: flex;
    align-items: center;
}

.company-logo {
    flex: 0 0 auto;
    height: 35px;
    width: auto;
    margin-right: 10px;
}

.footer-content p {
    font-size: 0.7em;
    color: #666;
}

.info-section p {
    flex: 1 0 68%;
    text-align: left;
    font-size: 0.65em;
    margin-left: 10px;
}


/* =========================================================
   モーダル
   ========================================================= */

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

/* モーダル本体 */
.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 300px;
    border-radius: 20px;
    text-align: center;
}

/* モーダル内ボタン共通 */
.modal-content button {
    margin-top: 20px;
    margin-right: 10px;
    margin-left: 10px;
    padding: 10px 20px;
    border: none;
    text-align: center;
    font-size: 1.125rem;
    transition: 0.3s;
    border-radius: 10px;
    width: 100px;
}

/* YESボタン */
.modal-content #yesBtn {
    background-color: var(--color-sub1);
    color: white;
}

.modal-content #yesBtn:hover {
    background-color: #eb6c00;
}

/* NOボタン */
.modal-content #noBtn {
    background-color: gray;
    color: white;
}

.modal-content #noBtn:hover {
    background-color: darkgray;
}

/* 外部リンク風 */
.toOshitabi {
    color: blue;
    text-decoration: underline;
}


/* =========================================================
   ノベルティ情報
   ========================================================= */

.novelity-location {
    width: 100%;
    margin: auto;
    border: 2px solid var(--color-sub1);
    background: white;
}

.novelity-title {
    font-size: var(--fs-lg);
    font-weight: 700;
    padding: 10px;
}

.novelity-border-full {
    margin: 1% auto 10px;
    width: 100%;
}

.novelity-city {
    font-size: var(--fs-lg);
    font-weight: 700;
    padding: 2px;
    border: 3px solid var(--color-sub4);
    border-radius: 50px;
    width: 40%;
    margin: auto;
}

.novelity-place-inner {
    margin: 10px auto;
}

.novelity-place {
    font-size: var(--fs-lg);
    font-weight: 700;
    padding: 10px;
}

.novelity-hours {
    font-size: var(--fs-base);
    font-weight: 700;
}

.novelity-caution {
    margin: auto;
    text-align: left;
    padding: 10px 10px 20px !important;
}


/* =========================================================
   スタンプ表示
   ========================================================= */

/* 横並びのスタンプ表示 */
.stamp-container {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 0px auto;
}

.stamp {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stamp img {
    max-width: 100%;
    max-height: 100%;
}

/* スタンプエリア本体 */
.stampContainer {
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* スタンプ全体の枠 */
.stamp-holder {
    border-radius: 0;
    width: 100%;
    color: var(--color-black);
    margin: 10px auto;
}

/* アイコンをグリッドで並べる */
.icon-grid {
    display: grid;
    gap: 10px;
    margin: 10px auto;
    width: calc(100% - 10px);
    justify-items: center;
    align-items: start;
}

/* 3列版 */
.icon-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    width: 75%;
}

/* 4列版 */
.icon-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 各スタンプアイコン */
.stampIcon {
    width: 100%;
    max-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* アイコン下の名前 */
.name-tag {
    margin-top: 5px;
    font-size: 12px;
    text-align: center;
    color: var(--color-black);
    font-weight: 900;
}

/* スタンプ画像 */
.stampContainer .stampIcon img {
    width: 100%;
    max-width: 120px;
    border-radius: 5px;
    height: auto;
    display: block;
}


/* =========================================================
   ユーティリティクラス
   ========================================================= */

/* フォントサイズ系 */
.text-sm {
    font-size: var(--fs-sm);
}

.text-base {
    font-size: var(--fs-base);
}

.text-md {
    font-size: var(--fs-md);
}

.text-lg {
    font-size: var(--fs-lg);
}

.text-xl {
    font-size: var(--fs-xl);
}

.text-2xl {
    font-size: var(--fs-2xl);
}

/* 太さ系 */
.fw-400 {
    font-weight: 400;
}

.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}


.thumbnails-container {
    display: grid;
    grid-template-columns: repeat(4, 20%);
    grid-template-rows: repeat(1, auto);
    grid-gap: 10px 20px;
    justify-content: center;
    padding: 10px;
}

.thumbnail {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.title-image {
    margin-bottom: 10px;
}

.phase-name {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 10px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.stampCardHolder {
    justify-content: center;
    align-items: center;
    margin: auto;
    margin-left: 5px;
    margin-right: 5px;
}

.stampCard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 0px;
    font-family: 'Noto Sans JP';
    padding: 0px 0px;
    margin: auto;
    background-image: url("/img/railwayBG.svg");
    background-repeat: no-repeat;
    /* size/position は JS (alignRailwayTrack) で動的にセット */
    background-size: 0;
}

.stampInfo {
    background-color: white;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    font-family: 'Noto Sans JP';
    padding: 10px;
    border-width: 0px 2px 2px 2px;
    border-radius: 0px 0px 10px 10px;
    border-style: solid;
    border-color: var(--color-red);
    margin: auto;
    padding-bottom: 5px;
}

.stampCompletedText {
    color: #FFF;
    background-color: rgba(0, 0, 0, 0.75);
    width: 100%;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
    font-size: 20px;
    font-weight: 600;
}

.stamp-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stamp-frame {
    width: 98px;
    height: 98px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    /* allow the image to stick out */
    margin-bottom: -15px;
}

.stamp {
    width: 100%;
    height: 100%;
    background-color: #FFF;
    border-radius: 50%;
    /* top: 10px; */
    position: relative;
}

.stamp-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    top: 10px;
    /* Ensures the overlay stays within bounds */
}

.wrapperExist::before {
    content: '？';
    font-size: 58px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    border-radius: 50%;
    z-index: 1;
    font-weight: 700;
}


.stampTitle {
    color: #FFF;
    width: 100%;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
    font-size: 20px;
    font-weight: 700;
    border-radius: 10px 10px 0px 0px;
}


.tabContainer {
    display: flex;
    align-items: center;
}

.timeContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
}

/* .time {
    color: #FFF;
    text-align: center;
    margin-top: 5px;
    padding: 2px 10px;
    box-sizing: border-box;
    font-size: 17px;
    border-radius: 50px;
    font-weight: 600;
    z-index: 3;
} */

.time {
    position: relative;
    display: inline-block;
    color: black;
    text-align: center;
    margin-top: 5px;
    padding: 0px 10px 5px;
    box-sizing: border-box;
    font-size: 0.9rem;
    border-radius: 0px;
    font-weight: 700;
    background-color: #fff !important;
    border: 2px solid black;
    min-width: 90px;
    letter-spacing: 2px;
    z-index: 2;
}

.time::before {
    content: "";
    position: absolute;
    bottom: 3px;
    /* Adjust this value to control the distance between the text and the line */
    left: 0;
    width: 100%;
    height: 3px;
    /* Adjust this value to control the thickness of the line */
    background-color: var(--color-tokai);
}

.active {
    background-color: rgba(0, 0, 0, 0.75);
    border-bottom: 3px solid #FFF100;
}

.inactive {
    background-color: rgba(128, 128, 128, 0.75);
    border-bottom: 3px solid gray;
}

.middle-stamp {
    grid-column: span 3;
    display: flex;
    justify-content: center;
}
/* =========================================================
   応募ポップアップ
   ========================================================= */

.applyCodePopup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.popup-overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    width: 80%;
    max-width: 320px;
    text-align: center;
}

.popup-title {
    font-size: var(--fs-md);
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 20px;
}

.popup-buttons {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}
