/* =======================================================
 * Stamp Rally – スタイルシート
 * モバイルファーストの設計
 * ======================================================= */

/* -------------------------------------------------------
 * CSS変数
 * ----------------------------------------------------- */
:root {
    --sr-primary: #2864f0;
    --sr-primary-dk: #285ac8;
    --sr-accent: #3264dc;
    --sr-green: #00963c;       /* フォールバック（カスタマイザー未設定時） */
    --sr-got-color: #00963c;   /* カスタマイザーで上書きされる */
    --sr-bg: #f7f5f5;
    --sr-surface: #ffffff;
    --sr-text: #595959;
    --sr-muted: #8c8989;
    --sr-border: #e9e7e7;
    --sr-radius: 12px;
    --sr-shadow: 0 0 1rem rgba(0, 0, 0, 0.1), 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
    --sr-transition: 0.25s ease;
}

/* -------------------------------------------------------
 * ラッパー
 * ----------------------------------------------------- */
.sr-wrap {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
    color: var(--sr-text);
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 40px;
}

/* -------------------------------------------------------
 * 固定ページ情報エリア（マップ上部）
 * ----------------------------------------------------- */
.sr-page-intro {
    background: var(--sr-surface);
    border-radius: var(--sr-radius);
    box-shadow: var(--sr-shadow);
    padding: 20px 20px 16px;
    margin-bottom: 16px;
}

.sr-page-intro-title {
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 900;
    color: var(--sr-dark);
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--sr-primary);
}

.sr-page-intro-body {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
}

.sr-page-intro-body p {
    margin: 0 0 0.75em;
}

.sr-page-intro-body p:last-child {
    margin-bottom: 0;
}

/* -------------------------------------------------------
 * ヘッダー進捗
 * ----------------------------------------------------- */
.sr-header {
    background: var(--sr-primary);
    color: #fff;
    padding: 20px;
    border-radius: 0 0 var(--sr-radius) var(--sr-radius);
    margin-bottom: 12px;
}

/* -------------------------------------------------------
 * プログレスバー
 * ----------------------------------------------------- */
.sr-progress-wrap,
.sr-progress-widget {
    width: 100%;
}

.sr-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.sr-progress-rate {
    font-size: 24px;
    font-weight: 700;
}

.sr-progress-bar-bg {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 99px;
    height: 14px;
    overflow: hidden;
}

.sr-header .sr-progress-bar-bg {
    background: rgba(255, 255, 255, 0.3);
}

.sr-progress-widget .sr-progress-bar-bg {
    background: var(--sr-border);
}

.sr-progress-bar-fill {
    height: 100%;
    background: #ffffff;
    border-radius: 99px;
    width: 0%;
    transition: width 0.7s ease;
}

.sr-progress-widget .sr-progress-bar-fill {
    background: var(--sr-primary);
}

.sr-progress-count {
    margin: 6px 0 0;
    font-size: 12px;
    opacity: 0.85;
}

/* -------------------------------------------------------
 * スタンプ収集率（グリッド用）
 * ----------------------------------------------------- */
.sr-stamp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 12px;
    margin: 16px 0;
    justify-items: center;
    align-items: start;
}

.sr-grid-loc-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* =======================================================
 * カテゴリーフィルター
 * ===================================================== */
.sr-category-filter {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 12px 15px;
    background: var(--sr-surface);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sr-category-filter::-webkit-scrollbar {
    display: none;
}

.sr-cat-btn {
    flex: 0 0 auto;
    padding: 6px 16px;
    border: 1px solid var(--sr-primary);
    border-radius: 20px;
    background: transparent;
    color: var(--sr-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--sr-transition);
    white-space: nowrap;
}

.sr-cat-btn:hover {
    background: rgba(230, 57, 70, 0.05);
}

.sr-cat-btn--active {
    background: var(--sr-primary);
    color: #fff;
}

.sr-grid-item {
    width: 64px;
    height: 64px;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.15);
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.sr-grid-item--got {
    background: #fff;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.sr-grid-item-img {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.sr-grid-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(0.8) brightness(1.2);
    transition: all 0.3s ease;
}

.sr-grid-item-img.got img {
    filter: grayscale(0%) contrast(1) brightness(1);
}

.sr-grid-check {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--sr-got-color);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.sr-grid-item-icon {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
}

.sr-grid-item-icon.got {
    color: var(--sr-primary);
    font-size: 28px;
    font-weight: 900;
}

.sr-grid-loc-title {
    font-size: 11px;
    line-height: 1.3;
    text-align: center;
    color: #fff;
    opacity: 0.9;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* アンカーリンク（#sr-progress）で移動したときに、
   要素が画面上端に張り付かないよう余白を確保する */
#sr-progress {
    scroll-margin-top: 20px;
}

.sr-progress-widget {
    background: var(--sr-surface);
    padding: 20px;
    border-radius: var(--sr-radius);
    box-shadow: var(--sr-shadow);
}

.sr-progress-widget .sr-progress-label {
    color: var(--sr-text);
}

.sr-progress-widget .sr-progress-count {
    color: var(--sr-muted);
}

.sr-complete-msg {
    color: var(--sr-primary);
    font-weight: 700;
    margin-top: 10px;
}

/* -------------------------------------------------------
 * プログレスウィジェット内 スタンプ場所一覧
 * ----------------------------------------------------- */
.sr-progress-location-list {
    margin-top: 24px;
    border-top: 2px solid var(--sr-border);
    padding-top: 20px;
}

.sr-progress-list-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--sr-text);
    margin: 0 0 14px;
}

.sr-progress-loc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background var(--sr-transition);
}

.sr-progress-loc--got {
    background: #e8f5ee;
}

.sr-progress-loc--pending {
    background: #f8f8f8;
}

.sr-progress-loc-icon {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sr-progress-loc-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sr-progress-loc-emoji {
    font-size: 22px;
}

.sr-progress-loc--pending .sr-progress-loc-icon {
    filter: grayscale(1);
    opacity: 0.55;
}

.sr-progress-loc-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    border: 2px solid #fff;
}

.sr-progress-check {
    background: var(--sr-got-color);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    position: absolute;
    bottom: -2px;
    right: -2px;
    border: 2px solid #fff;
}

.sr-progress-pending {
    background: #bbb;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    position: absolute;
    bottom: -2px;
    right: -2px;
    border: 2px solid #fff;
}

.sr-progress-loc-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.sr-progress-loc-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--sr-text);
}

.sr-progress-loc-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
    white-space: nowrap;
}

.sr-badge--got {
    background: #e6f7ed;
    color: var(--sr-got-color);
}

.sr-badge--pending {
    background: #ebebeb;
    color: #888;
}

/* -------------------------------------------------------
 * マップ
 * ----------------------------------------------------- */
#sr-map {
    width: 100%;
    height: 380px;
    border-radius: var(--sr-radius);
    overflow: hidden;
    box-shadow: var(--sr-shadow);
}

/* -------------------------------------------------------
 * GPS状態
 * ----------------------------------------------------- */
.sr-gps-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin: 10px 0;
    border-radius: 99px;
    font-size: 13px;
    background: var(--sr-surface);
    box-shadow: var(--sr-shadow);
}

.sr-gps-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
}

.sr-gps-status--ok .sr-gps-dot {
    background: var(--sr-green);
    animation: sr-pulse 1.5s infinite;
}

.sr-gps-status--error .sr-gps-dot {
    background: var(--sr-primary);
}

.sr-gps-status--waiting .sr-gps-dot {
    background: #ffb91e;
    animation: sr-pulse 1s infinite;
}

@keyframes sr-pulse {

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

    50% {
        transform: scale(1.4);
        opacity: 0.6;
    }
}

/* -------------------------------------------------------
 * スタンプカード
 * ----------------------------------------------------- */
.sr-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 24px 0 12px;
    padding-left: 10px;
    border-left: 4px solid var(--sr-primary);
}

.sr-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 40px;
}

.sr-card {
    display: block;
    background: var(--sr-surface);
    border-radius: var(--sr-radius);
    box-shadow: var(--sr-shadow);
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--sr-transition), box-shadow var(--sr-transition);
    position: relative;
}

.sr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
}

.sr-card-icon {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sr-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sr-card-placeholder {
    font-size: 32px;
    filter: grayscale(1);
    opacity: 0.4;
}

.sr-card--got .sr-card-placeholder {
    filter: none;
    opacity: 1;
}



.sr-card-title {
    font-size: 14px;
    font-weight: 600;
    padding: 6px 6px 8px;
    text-align: center;
    color: var(--sr-text);
}

.sr-card--got {
    border: 2px solid var(--sr-got-color);
}

.sr-card--pending {
    border: 2px solid var(--sr-border);
}

.sr-card--pending .sr-card-icon {
    filter: grayscale(0.6);
}

/* カードのアイキャッチ画像エリア */
.sr-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--sr-bg);
}

.sr-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* サムネイル左上に重ねるチェックイン方式バッジ（sr-tagを流用） */
.sr-card-thumb .sr-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    margin-bottom: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* -------------------------------------------------------
 * マップマーカー
 * ----------------------------------------------------- */
.sr-map-marker {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 3px solid var(--sr-primary);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sr-map-marker span {
    transform: rotate(45deg);
    font-size: 18px;
    line-height: 1;
}

.sr-map-marker--got {
    border-color: var(--sr-got-color);
    background: #e8f5ee;
}

/* 画像マーカー */
.sr-map-marker-img {
    width: 48px;
    height: 48px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid var(--sr-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    background: #fff;
    position: relative;
}

.sr-map-marker-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: rotate(45deg);
    /* 親の回転を打ち消して正立 */
    filter: grayscale(0.5) opacity(0.7);
}

.sr-map-marker-img--got {
    border-color: var(--sr-got-color);
}

.sr-map-marker-img--got img {
    filter: none;
    /* 取得済みはカラーで表示 */
}

.sr-map-marker-check {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: var(--sr-got-color);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    transform: rotate(45deg);
    /* 親の回転を打ち消し */
}

.sr-user-marker {
    width: 36px;
    height: 36px;
    background: var(--sr-accent);
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    font-size: 16px;
    color: #fff;
}

/* -------------------------------------------------------
 * ポップアップ
 * ----------------------------------------------------- */
.leaflet-popup-content .sr-popup h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.leaflet-popup-content .sr-popup p {
    margin: 0 0 10px;
    color: var(--sr-muted);
    font-size: 13px;
}

.sr-popup-got {
    color: var(--sr-got-color);
    font-weight: 700;
    font-size: 14px;
}

.sr-popup-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
}

/* -------------------------------------------------------
 * ボタン
 * ----------------------------------------------------- */
.sr-btn {
    display: inline-block;
    background: var(--sr-primary);
    color: #fff !important;
    border: none;
    border-radius: 99px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--sr-transition), transform var(--sr-transition);
    letter-spacing: 0.5px;
}

.sr-btn:hover {
    background: var(--sr-primary-dk);
    transform: translateY(-1px);
}

.sr-btn-primary {
    background: var(--sr-primary);
    font-size: 16px;
    padding: 14px 36px;
}

.sr-btn--accent {
    background: var(--sr-accent);
}

.sr-btn--accent:hover {
    background: #1e46aa;
}

.sr-route-btn-wrap {
    text-align: center;
    margin: 10px 0 24px;
}

/* -------------------------------------------------------
 * モーダル
 * ----------------------------------------------------- */
.sr-modal {
    display: none;
    position: fixed;
    inset: 0;
    /* スポット詳細モーダル（.sr-bottom-modal / 10000）より必ず前面に出す。
       結果やエラーの通知が詳細モーダルの裏に隠れると、
       利用者が失敗理由に気づけないため */
    z-index: 10100;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.sr-modal--open {
    display: flex;
}

.sr-modal-inner {
    background: #fff;
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    animation: sr-modal-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes sr-modal-in {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.sr-stamp-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
}

/* エラーや通知のときは演出を出さない（JSが hidden 属性で制御する）。
   width/height 指定に負けないよう明示的に打ち消す */
.sr-stamp-animation[hidden] {
    display: none;
}

/* エラー内訳など、改行を含むメッセージをそのまま表示する */
#sr-modal-msg {
    white-space: pre-line;
    word-break: break-all;
}

.sr-stamp-animation svg {
    width: 100%;
    height: 100%;
    transform: scale(0);
    filter: drop-shadow(0 0 8px rgba(40, 100, 240, 0.5));
}

.sr-stamp-anim--playing svg {
    animation: sr-stamp-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

@keyframes sr-stamp-pop {
    from {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.2) rotate(5deg);
    }

    to {
        transform: scale(1) rotate(-10deg);
        opacity: 1;
    }
}

.sr-modal-inner h3 {
    font-size: 22px;
    color: var(--sr-primary);
    margin: 0 0 8px;
}

.sr-modal-inner p {
    color: var(--sr-muted);
    margin: 0 0 20px;
    line-height: 1.6;
}

/* -------------------------------------------------------
 * コンプリートページ
 * ----------------------------------------------------- */
.sr-complete-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 20px;
}

.sr-complete-header {
    text-align: center;
    padding: 40px 0 30px;
}

.sr-trophy {
    font-size: 72px;
    animation: sr-trophy-bounce 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@keyframes sr-trophy-bounce {
    from {
        transform: scale(0) rotate(-20deg);
    }

    to {
        transform: scale(1) rotate(0deg);
    }
}

.sr-complete-header h1 {
    font-size: 26px;
    color: var(--sr-primary);
    margin: 16px 0 8px;
}

.sr-complete-header p {
    color: var(--sr-muted);
    font-size: 16px;
}

/* 応募フォーム */
.sr-apply-form-wrap {
    background: var(--sr-surface);
    border-radius: var(--sr-radius);
    box-shadow: var(--sr-shadow);
    padding: 28px;
    margin-top: 24px;
}

.sr-apply-form-wrap h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.sr-apply-form-wrap>p {
    color: var(--sr-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.sr-form-group {
    margin-bottom: 18px;
}

.sr-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.sr-form-group input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cccccc;
    border-radius: 4px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    transition: border-color var(--sr-transition);
}

.sr-form-group input:focus {
    border-color: var(--sr-primary);
}

.required {
    color: #dc1e32;
}

.sr-form-error {
    background: #ffe0e0;
    color: #dc1e32;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.sr-apply-success,
.sr-incomplete-notice {
    text-align: center;
    padding: 48px 20px;
}

.sr-confetti,
.sr-incomplete-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.sr-apply-success h2 {
    font-size: 24px;
    color: var(--sr-got-color);
}

.sr-incomplete-notice h2 {
    font-size: 22px;
}

/* -------------------------------------------------------
 * スタンプ一覧
 * ----------------------------------------------------- */
.sr-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sr-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--sr-surface);
    border-radius: var(--sr-radius);
    box-shadow: var(--sr-shadow);
    padding: 14px;
    border-left: 5px solid var(--sr-border);
    transition: transform var(--sr-transition);
    text-decoration: none;
    color: inherit;
}

.sr-list-item:hover {
    transform: translateX(4px);
}

.sr-got {
    border-left-color: var(--sr-got-color);
}

.sr-not-got {
    border-left-color: var(--sr-border);
}

.sr-list-icon {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--sr-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sr-list-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sr-list-icon-placeholder {
    font-size: 28px;
}

.sr-not-got .sr-list-icon-placeholder {
    filter: grayscale(1);
    opacity: 0.4;
}

.sr-list-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 150, 60, 0.9);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    padding: 2px 0;
}

.sr-list-info h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.sr-list-info p {
    margin: 0 0 4px;
    color: var(--sr-muted);
    font-size: 13px;
}

.sr-list-arrow {
    font-size: 22px;
    color: var(--sr-border);
    margin-left: auto;
    flex-shrink: 0;
}

/* -------------------------------------------------------
 * 個別スタンプ場所ページ共通レイアウト
 * ----------------------------------------------------- */
.sr-loc-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 0 60px;
}

.sr-loc-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: -8px 0 20px;
}

.sr-loc-section-title {
    font-size: 17px;
    font-weight: 700;
    margin: 28px 0 12px;
    padding-left: 10px;
    border-left: 4px solid var(--sr-primary);
}

.sr-loc-map-wrap {
    margin-top: 8px;
}

.sr-loc-info-wrap {
    background: var(--sr-surface);
    border-radius: var(--sr-radius);
    box-shadow: var(--sr-shadow);
    overflow: hidden;
    margin: 24px 0;
}

.sr-loc-before-after {
    margin-top: 28px;
}

.sr-loc-before-after-grid {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.sr-loc-ba-item {
    text-align: center;
}

.sr-loc-ba-item img {
    max-width: 200px;
    border-radius: 10px;
    display: block;
    margin: 0 auto 6px;
}

.sr-loc-ba-item span {
    font-size: 12px;
    color: var(--sr-muted);
}

.sr-loc-ba-locked img {
    filter: blur(5px);
    opacity: 0.6;
}

/* -------------------------------------------------------
 * ログインリマインダー
 * ----------------------------------------------------- */
.sr-login-notice {
    text-align: center;
    padding: 40px 20px;
    background: var(--sr-surface);
    border-radius: var(--sr-radius);
    box-shadow: var(--sr-shadow);
}

.sr-login-notice p {
    margin-bottom: 16px;
    color: var(--sr-muted);
}

/* -------------------------------------------------------
 * レスポンシブ
 * ----------------------------------------------------- */
@media (min-width: 600px) {
    #sr-map {
        height: 460px;
    }

    .sr-cards {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

@media (max-width: 400px) {
    .sr-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .sr-stamp-animation {
        width: 80px;
        height: 80px;
    }
}

/* -------------------------------------------------------
 * チェックイン条件タグ
 * ----------------------------------------------------- */
.sr-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
    margin-bottom: 8px;
}

.sr-tag--gps {
    background: #ebf3ff;
    color: #2864f0;
}

.sr-tag--qr {
    background: #fef3c7;
    color: #92400e;
}

.sr-tag--both {
    background: #ede9fe;
    color: #5b21b6;
}

/* -------------------------------------------------------
 * ポップアップ内リンク
 * ----------------------------------------------------- */
.sr-popup-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--sr-accent);
    text-decoration: none;
}

.sr-popup-link:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------
 * QRコードスキャナーオーバーレイ
 * ----------------------------------------------------- */
#sr-qr-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
}

#sr-qr-overlay.sr-qr-overlay--open {
    display: flex;
}

.sr-qr-inner {
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    text-align: center;
    max-width: 360px;
    width: 92%;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
    animation: sr-modal-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.sr-qr-inner h3 {
    margin: 0 0 6px;
    font-size: 18px;
    color: var(--sr-text);
}

.sr-qr-hint {
    font-size: 13px;
    color: var(--sr-muted);
    margin: 0 0 14px;
}

.sr-qr-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

#sr-qr-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sr-qr-frame {
    position: absolute;
    inset: 14%;
    border: 3px solid var(--sr-primary);
    border-radius: 8px;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.35);
    animation: sr-qr-blink 1.5s ease-in-out infinite;
}

@keyframes sr-qr-blink {

    0%,
    100% {
        border-color: var(--sr-primary);
    }

    50% {
        border-color: rgba(40, 100, 240, 0.4);
    }
}

.sr-qr-status {
    font-size: 13px;
    color: var(--sr-muted);
    margin: 12px 0;
    min-height: 18px;
}

/* -------------------------------------------------------
 * 個別スタンプ場所ページ
 * ----------------------------------------------------- */
.sr-loc-hero {
    position: relative;
    border-radius: var(--sr-radius);
    overflow: hidden;
    margin-bottom: 24px;
    background: var(--sr-bg);
}

.sr-loc-hero-slide {
    display: none;
}

.sr-loc-hero-slide.sr-slide-active {
    display: block;
    animation: sr-fadein 0.5s ease;
}

@keyframes sr-fadein {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.sr-loc-hero-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.sr-loc-hero-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: #ccc;
}

.sr-loc-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 4px;
}

.sr-loc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.2s;
}

.sr-loc-dot.active {
    background: var(--sr-primary);
}

/* スライダー前後ナビゲーションボタン */
.sr-slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #323232;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
}

.sr-slide-btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.sr-slide-prev {
    left: 10px;
}

.sr-slide-next {
    right: 10px;
}

.sr-loc-stamp-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--sr-got-color);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 99px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sr-loc-info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.sr-loc-info-table th,
.sr-loc-info-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--sr-border);
    text-align: left;
    vertical-align: top;
}

.sr-loc-info-table th {
    width: 36%;
    color: var(--sr-muted);
    font-weight: 600;
    white-space: nowrap;
}

.sr-loc-info-table th .fa-solid {
    width: 1.1em;
    text-align: center;
    color: var(--sr-primary);
    margin-right: 4px;
}

.sr-loc-desc {
    line-height: 1.8;
    font-size: 15px;
    color: var(--sr-text);
    margin-bottom: 24px;
}

.sr-loc-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--sr-muted);
    text-decoration: none;
    margin-bottom: 20px;
}

.sr-loc-back:hover {
    color: var(--sr-text);
}

.sr-loc-stamp-img-wrap {
    background: var(--sr-surface);
    border-radius: var(--sr-radius);
    box-shadow: var(--sr-shadow);
    padding: 20px;
    text-align: center;
    margin-top: 24px;
}

.sr-loc-stamp-img-wrap h3 {
    font-size: 15px;
    margin: 0 0 12px;
    color: var(--sr-muted);
}

.sr-loc-stamp-img-wrap img {
    max-width: 220px;
    border-radius: 10px;
}

/* -------------------------------------------------------
 * スタンプボタン（個別ページ）
 * ----------------------------------------------------- */
.sr-loc-stamp-section {
    margin: 24px 0;
    text-align: center;
}

.sr-stamp-btn-wrap {
    display: flex;
    justify-content: center;
}

.sr-stamp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    background: var(--sr-primary);
    color: #fff;
    border: none;
    border-radius: 99px;
    padding: 18px 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(40, 100, 240, 0.4);
    transition: background var(--sr-transition), transform var(--sr-transition), box-shadow var(--sr-transition);
}

.sr-stamp-btn:hover:not(:disabled) {
    background: var(--sr-primary-dk);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(40, 100, 240, 0.5);
}

.sr-stamp-btn--disabled,
.sr-stamp-btn:disabled {
    background: #c8c8c8;
    color: #8c8989;
    box-shadow: none;
    cursor: not-allowed;
}

.sr-stamp-btn .fa-solid {
    font-size: 1.1em;
    margin-right: 6px;
    vertical-align: middle;
}

.sr-stamp-condition-note {
    font-size: 12px;
    color: var(--sr-muted);
    margin-top: 10px;
}

/* -------------------------------------------------------
 * 個別ページ用モーダル
 * ----------------------------------------------------- */
.sr-loc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.sr-loc-modal--open {
    display: flex;
}

.sr-loc-modal-inner {
    background: #fff;
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    animation: sr-modal-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.sr-loc-modal-inner h3 {
    font-size: 22px;
    color: var(--sr-primary);
    margin: 16px 0 8px;
}

.sr-loc-modal-inner p {
    color: var(--sr-muted);
    margin: 0 0 20px;
    line-height: 1.6;
}

/* QRオーバーレイのIDも対応（個別ページ用） */
#sr-loc-qr-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
}

#sr-loc-qr-overlay.sr-qr-overlay--open {
    display: flex;
}

/* -------------------------------------------------------
 * トップページ用 ボトムアップ詳細モーダル
 * ----------------------------------------------------- */
.sr-bottom-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    /* 初期状態はクリック透過 */
}

/* 暗くなる背景レイヤー */
.sr-bottom-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* モーダル本体（下からスライド） */
.sr-bottom-modal-content {
    position: relative;
    background: #fff;
    width: 100%;
    /* 上部に30pxの隙間を空ける */
    height: calc(100% - 30px);
    border-radius: 20px 20px 0 0;
    padding: 24px;
    box-sizing: border-box;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.1, 0.8, 0.2, 1);
    pointer-events: auto;
    /* コンテンツ部分はクリック可能に */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

/* 開いた時の状態 */
.sr-bottom-modal.is-open {
    pointer-events: auto;
}

.sr-bottom-modal.is-open .sr-bottom-modal-overlay {
    opacity: 1;
    pointer-events: auto;
    /* 背景クリックで閉じるため */
}

.sr-bottom-modal.is-open .sr-bottom-modal-content {
    transform: translateY(0);
}

/* 閉じるボタン（右上） */
.sr-bottom-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #323232;
    border: none;
    cursor: pointer;
    z-index: 10001;
    /* sr-bottom-modal-content より上に来るように */
    line-height: 1;
    padding: 0;
    transition: background 0.2s;
}

.sr-bottom-modal-close:hover {
    background: #e0e0e0;
}

/* 「一覧に戻る」ボタン（モーダル最下部・マップの下）
   動作は右上の×と同じだが、見た目は別物なので専用クラスで定義する */
.sr-modal-back-wrap {
    margin: 28px 0 8px;
    text-align: center;
}

.sr-modal-back {
    background: var(--sr-surface);
    color: var(--sr-text) !important;
    border: 2px solid var(--sr-border);
    min-width: 200px;
}

.sr-modal-back:hover {
    background: var(--sr-bg);
}

/* モーダル内のコンテンツ微調整 */
.sr-bottom-modal-content .page-title {
    font-size: 22px;
    margin-top: 10px;
    margin-bottom: 16px;
    padding-right: 40px;
    /* 閉じるボタンと被らないように */
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sr-modal-title-badge {
    background: var(--sr-green);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 99px;
    display: inline-block;
    vertical-align: middle;
}

.sr-bottom-modal-content .sr-loc-meta-row {
    margin-bottom: 24px;
}

/* モーダル内情報テーブルの折り返し対応 */
.sr-bottom-modal-content .sr-loc-info-table {
    width: 100%;
    table-layout: fixed;
    /* 横幅固定レイアウトでセル幅を制限 */
}

.sr-bottom-modal-content .sr-loc-info-table th {
    width: 35%;
    /* 見出しの幅を適当に確保 */
}

.sr-bottom-modal-content .sr-loc-info-table td {
    word-break: break-word;
    /* 長い単語で折り返す */
    overflow-wrap: anywhere;
    /* URL等も折り返す */
    white-space: normal;
}

/* スタンプ取得時のアニメーション用 */
@keyframes sr-fade-in {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ギャラリースライダーの基本構造 */
.sr-loc-gallery-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.sr-loc-gallery-slides {
    position: relative;
    width: 100%;
    /* モーダル内では高さを制限して画像比率を保つ */
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #f7f5f5;
}

.sr-loc-gallery-slide {
    position: absolute;
    inset: 0;
}

.sr-loc-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 枠いっぱいに表示させるためにcoverに変更 */
}

/* スライダー操作ボタン（◀︎・▶︎）の配置 */
.sr-loc-gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sr-loc-gallery-prev {
    left: 8px;
}

.sr-loc-gallery-next {
    right: 8px;
}

/* ●で囲んだボタンスタイル */
.sr-loc-gallery-btn-inner {
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    transition: background 0.2s;
}

.sr-loc-gallery-btn:hover .sr-loc-gallery-btn-inner {
    background: rgba(0, 0, 0, 0.7);
}

/* -------------------------------------------------------
 * 特典応募フォーム（MW WP Form）スタイル
 * ----------------------------------------------------- */
.sr-benefit-form .mw_wp_form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--sr-border);
}

.sr-benefit-form .mwform-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* pタグのリセット（MW WP Formが出力するコメント用pタグ）
   通常は wpautop を無効化しているため出力されないが、保険として残す。
   空の p は入れ子（.contact-form-row 内など）でも除去する */
.sr-benefit-form .mwform-wrap > p:empty,
.sr-benefit-form .mwform-wrap > p:not([class]),
.sr-benefit-form .mwform-wrap p:empty {
    display: none;
}

/* 2カラム行（お名前・フリガナ） */
.sr-benefit-form .contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .sr-benefit-form .contact-form-row {
        grid-template-columns: 1fr;
    }
}

/* フィールドブロック */
.sr-benefit-form .form-field {
    margin-bottom: 16px;
}

.sr-benefit-form .contact-form-row .form-field {
    margin-bottom: 0;
}

/* ラベル */
.sr-benefit-form .form-field label,
.sr-benefit-form .mwform-wrap label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--sr-text);
    margin-bottom: 6px;
}

/* 必須バッジ */
.sr-benefit-form .form-required,
.sr-benefit-form .mwform-wrap .form-required {
    display: inline-block;
    background: #dc1e32;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 99px;
    letter-spacing: 0.3px;
    line-height: 1.6;
}

/* テキスト・メール・電話・数値入力
   （郵便番号欄は zipaddr のスクリプトが実行時に type="tel" へ変換するため tel も含める） */
.sr-benefit-form .mwform-wrap input[type="text"],
.sr-benefit-form .mwform-wrap input[type="email"],
.sr-benefit-form .mwform-wrap input[type="tel"],
.sr-benefit-form .mwform-wrap input[type="number"],
.sr-benefit-form .mwform-wrap input[type="url"],
.sr-benefit-form .mwform-wrap textarea {
    width: 100%;
    box-sizing: border-box;
    background: var(--sr-surface);
    border: 1.5px solid var(--sr-border);
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--sr-text);
    outline: none;
    transition: border-color var(--sr-transition), box-shadow var(--sr-transition);
    appearance: none;
    -webkit-appearance: none;
}

.sr-benefit-form .mwform-wrap input[type="text"]:focus,
.sr-benefit-form .mwform-wrap input[type="email"]:focus,
.sr-benefit-form .mwform-wrap input[type="tel"]:focus,
.sr-benefit-form .mwform-wrap input[type="number"]:focus,
.sr-benefit-form .mwform-wrap input[type="url"]:focus,
.sr-benefit-form .mwform-wrap textarea:focus {
    border-color: var(--sr-primary);
    box-shadow: 0 0 0 3px rgba(40, 100, 240, 0.12);
}

/* セレクトボックス */
.sr-benefit-form .mwform-wrap select {
    width: 100%;
    box-sizing: border-box;
    /* background-image を残すため shorthand ではなく background-color を指定 */
    background-color: var(--sr-surface);
    border: 1.5px solid var(--sr-border);
    border-radius: 8px;
    padding: 11px 40px 11px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--sr-text);
    outline: none;
    cursor: pointer;
    transition: border-color var(--sr-transition), box-shadow var(--sr-transition);
    appearance: none;
    -webkit-appearance: none;
    /* appearance:none でネイティブの矢印が消えるため SVG で描画 */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
}

.sr-benefit-form .mwform-wrap select:focus {
    border-color: var(--sr-primary);
    box-shadow: 0 0 0 3px rgba(40, 100, 240, 0.12);
}

/* テキストエリア */
.sr-benefit-form .mwform-wrap textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.7;
}

/* 電話番号フィールド */
.sr-benefit-form .mwform-tel-field {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.sr-benefit-form .mwform-tel-field input[type="text"],
.sr-benefit-form .mwform-tel-field input[type="tel"] {
    width: auto;
    flex: 1 1 0;
    text-align: center;
    padding: 11px 8px;
}

.sr-benefit-form .mwform-tel-field {
    color: var(--sr-muted);
    font-weight: 700;
}

/* 送信ボタンエリア */
.sr-benefit-form .form-submit {
    margin-top: 8px;
    text-align: center;
}

.sr-benefit-form .form-submit input[type="submit"] {
    display: inline-block;
    background: var(--sr-primary);
    color: #fff;
    border: none;
    border-radius: 99px;
    padding: 13px 48px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background var(--sr-transition), transform var(--sr-transition);
    width: 100%;
    max-width: 320px;
}

.sr-benefit-form .form-submit input[type="submit"]:hover {
    background: var(--sr-primary-dk);
    transform: translateY(-1px);
}

/* エラーメッセージ */
.sr-benefit-form .mw_wp_form .error,
.sr-benefit-form .mwform-wrap .error {
    color: #dc1e32;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.sr-benefit-form .mwform-wrap input.mw_wp_form_error,
.sr-benefit-form .mwform-wrap textarea.mw_wp_form_error {
    border-color: #dc1e32;
    box-shadow: 0 0 0 3px rgba(220, 30, 50, 0.1);
}

/* 確認・完了画面 */
.sr-benefit-form .mw_wp_form_confirm .form-field,
.sr-benefit-form .mw_wp_form_complete .form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid var(--sr-border);
}

.sr-benefit-form .mw_wp_form_confirm .form-field label,
.sr-benefit-form .mw_wp_form_complete .form-field label {
    font-size: 12px;
    color: var(--sr-muted);
    font-weight: 600;
}

.sr-benefit-form .mw_wp_form_confirm .form-submit,
.sr-benefit-form .mw_wp_form_complete .form-submit {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.sr-benefit-form .mw_wp_form_confirm .form-submit input[type="submit"],
.sr-benefit-form .mw_wp_form_complete .form-submit input[type="submit"] {
    width: auto;
    flex: 1 1 120px;
    max-width: 200px;
}

/* 戻るボタン（確認画面） */
.sr-benefit-form .mw_wp_form_confirm .form-submit input[name="submitBack"] {
    background: #fff;
    color: var(--sr-text);
    border: 1.5px solid var(--sr-border);
    box-shadow: none;
}

.sr-benefit-form .mw_wp_form_confirm .form-submit input[name="submitBack"]:hover {
    background: var(--sr-border);
    transform: translateY(-1px);
    box-shadow: none;
}
/* -------------------------------------------------------
 * スタンプ画像と押印アニメーション（詳細モーダル内）
 * ----------------------------------------------------- */
.sr-stamp-visual {
    position: relative;
    margin-bottom: 20px;
    text-align: center;
}

.sr-stamp-visual-img {
    display: block;
    margin: 0 auto;
    max-width: 70%;
    height: auto;
    object-fit: contain;
}

/* 画像未設定時のフォールバックアイコン */
.sr-stamp-visual--placeholder {
    font-size: 32px;
}

/* --- 押印アニメーション ---
   上から大きく落ちてきて、着地でぐっと潰れて弾む。
   ハンコを押した感触を出すため、着地の瞬間に本体の揺れと波紋を重ねる。

   モーダル以外（スタンプ場所の個別ページなど）でも使えるよう、
   このクラス単体で成立するようにしている。
   囲み要素に sr-stamp-visual--press を付ければ、中の img が演出される */
.sr-stamp-visual--press img {
    animation: sr-stamp-press 0.75s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

@keyframes sr-stamp-press {
    0%   { opacity: 0; transform: scale(2.4) rotate(-14deg); }
    40%  { opacity: 1; }
    55%  { transform: scale(0.90) rotate(2deg); }   /* 着地：少し潰れる */
    70%  { transform: scale(1.06) rotate(-1deg); }  /* 反動 */
    85%  { transform: scale(0.98) rotate(0.5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* 着地の衝撃で全体を短く揺らす。
   position: relative は波紋（::after）の位置基準として必要 */
.sr-stamp-visual--press {
    position: relative;
    animation: sr-stamp-shake 0.3s ease-out 0.36s both;
}

@keyframes sr-stamp-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(5px); }
    60%      { transform: translateX(-3px); }
    80%      { transform: translateX(2px); }
}

/* 着地に合わせて外へ広がる波紋 */
.sr-stamp-visual--press::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--sr-got-color);
    border-radius: 50%;
    pointer-events: none;
    animation: sr-stamp-ripple 0.7s ease-out 0.36s both;
}

@keyframes sr-stamp-ripple {
    0%   { opacity: 0.6; transform: scale(0.4); }
    100% { opacity: 0;   transform: scale(7); }
}

/* 動きを抑える設定をしている利用者には演出を出さない */
@media (prefers-reduced-motion: reduce) {
    .sr-stamp-visual--press,
    .sr-stamp-visual--press img,
    .sr-stamp-visual--press::after {
        animation: none;
    }
}
