/* ================================================================
   スタンプラリー専用CSS
   ================================================================ */

/* ================================================================
   CSS変数
   ================================================================ */
:root {
    --stamp-primary: #2563eb;
    --stamp-primary-dark: #1d4ed8;
    --stamp-secondary: #f59e0b;
    --stamp-success: #10b981;
    --stamp-danger: #ef4444;
    --stamp-warning: #f59e0b;
    --stamp-info: #06b6d4;
    --stamp-light: #f8fafc;
    --stamp-dark: #1e293b;
    --stamp-gray-100: #f1f5f9;
    --stamp-gray-200: #e2e8f0;
    --stamp-gray-300: #cbd5e1;
    --stamp-gray-400: #94a3b8;
    --stamp-gray-500: #64748b;
    --stamp-gray-600: #475569;
    --stamp-gray-700: #334155;
    --stamp-gray-800: #1e293b;
    --stamp-gray-900: #0f172a;

    --stamp-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --stamp-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --stamp-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --stamp-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --stamp-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --stamp-border-radius: 8px;
    --stamp-border-radius-lg: 12px;
    --stamp-border-radius-xl: 16px;

    --stamp-transition: all 0.2s ease-in-out;
    --stamp-transition-fast: all 0.15s ease-in-out;
    --stamp-transition-slow: all 0.3s ease-in-out;
}

/* ================================================================
   ページタイトルコンポーネント
   ================================================================ */

/* ページタイトル */
.page-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 8px;
    color: #333;
}

.page-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 32px;
}

/* ================================================================
   既存UI要素の非表示設定
   ================================================================ */

/* スタンプラリーモード時にspFormを非表示 */
body.stamp-rally-active .searchForm .spForm {
    display: none !important;
}

/* スタンプラリーモード時に不要なカテゴリーを非表示 */
body.stamp-rally-active .categoryBtnList.scrollList .return-link__switch-button[data-type="106"],
body.stamp-rally-active .categoryBtnList.scrollList .return-link__switch-button[data-type="87"],
body.stamp-rally-active .categoryBtnList.scrollList .return-link__switch-button[data-type="79"],
body.stamp-rally-active .categoryBtnList.scrollList .return-link__switch-button[data-type="98"] {
    display: none !important;
}

/* ================================================================
   ヘッダーコンポーネント
   ================================================================ */

/* ヘッダーメインコンテナ - デフォルトはColumn形式（sticky） */
.stamp-rally-header {
    position: fixed;
    top: 1px;
    left: 1px;
    width: auto;
    z-index: 9999;
    /* background: linear-gradient(135deg, var(--stamp-primary) 0%, var(--stamp-primary-dark) 100%); */
    /* 開発用: 半透明の青色背景 */
    /* background: rgba(37, 99, 235, 0.8); */
    background: transparent;
    /* box-shadow: var(--stamp-shadow-md); */
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
}

/* Stackスタイルレイアウト用 - メインマップページでのみ適用 */
body.stamp-rally-active .stamp-rally-header {
    position: fixed;
}

/* Stackスタイルレイアウト用 - ヘッダーがアクティブな時のボディパディング */
body.stamp-rally-active {
    padding-top: 64px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    margin: 0;
    padding: 0;
    height: auto;
    /* 背景を完全透過、クリックを背後に通す */
    background: transparent;
    /* pointer-events: none; */
}

/* ヘッダータイトル */
.header-title {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-title span {
    display: inline-block;
}

/* 戻るボタン */
.header-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--stamp-border-radius);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--stamp-transition);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.header-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.header-back-btn .back-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* メニューボタン */
.header-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--stamp-primary);
    border: 1px solid var(--stamp-primary-dark);
    border-radius: var(--stamp-border-radius);
    cursor: pointer;
    transition: var(--stamp-transition);
    backdrop-filter: blur(10px);
}

.header-menu-btn:hover {
    background: var(--stamp-primary-dark);
    border-color: var(--stamp-primary-dark);
    transform: scale(1.05);
}

/* メニューアイコン */
.menu-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 18px;
    height: 14px;
}

.menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: var(--stamp-transition);
    transform-origin: center;
}

/* メニューボタンアクティブ時のアニメーション */
.header-menu-btn.active .menu-icon span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.header-menu-btn.active .menu-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.header-menu-btn.active .menu-icon span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* スペーサー */
.header-spacer {
    width: 44px;
    height: 44px;
}

/* ================================================================
   メニューオーバーレイ
   ================================================================ */

.header-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    transition: var(--stamp-transition-slow);
}

.header-menu.active {
    visibility: visible;
    opacity: 1;
}

/* メニューバックグラウンド */
.menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    transition: var(--stamp-transition-slow);
}

/* メニューコンテンツ */
.menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    box-shadow: var(--stamp-shadow-xl);
    transform: translateX(100%);
    transition: var(--stamp-transition-slow);
    display: flex;
    flex-direction: column;
}

.header-menu.active .menu-content {
    transform: translateX(0);
}

/* メニューヘッダー */
.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--stamp-primary) 0%, var(--stamp-primary-dark) 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-header h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.menu-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--stamp-border-radius);
    color: white;
    cursor: pointer;
    transition: var(--stamp-transition);
}

.menu-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.menu-close-btn .close-icon {
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    color: currentColor;
}

/* メニューリスト */
.menu-list {
    flex: 1;
    padding: 0;
    margin: 0;
    list-style: none;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.menu-item {
    border-bottom: 1px solid var(--stamp-gray-200);
}

.menu-item:last-child {
    border-bottom: none;
}

/* メニューリンク */
.menu-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px 16px 50px;
    /* 左の余白を26px増やして50pxに */
    color: var(--stamp-gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: var(--stamp-transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 1.125rem;
}

.menu-link:hover {
    background: var(--stamp-gray-100);
    color: var(--stamp-primary);
}

.menu-link.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--stamp-primary);
    border-right: 3px solid var(--stamp-primary);
}

.menu-link .menu-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* body スクロール制御 */
body.menu-open {
    overflow: hidden;
}

/* 開発用メニューセクション */
.dev-menu-section {
    margin-top: 16px;
    border-top: 1px solid var(--stamp-gray-200);
    padding-top: 16px;
    border-bottom: none;
}

.dev-menu-header {
    padding: 0 16px 12px 16px;
    border-bottom: 1px solid var(--stamp-gray-100);
    margin-bottom: 8px;
}

.dev-menu-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--stamp-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dev-menu-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.dev-menu-list .menu-item {
    border-bottom: 1px solid var(--stamp-gray-100);
}

.dev-menu-list .menu-item:last-child {
    border-bottom: none;
}

.dev-menu-list .menu-link {
    padding: 12px 16px 12px 42px;
    /* 左の余白を26px増やして42pxに */
    opacity: 0.8;
}

.dev-menu-list .menu-link:hover {
    background: rgba(37, 99, 235, 0.05);
    opacity: 1;
}

/* ================================================================
   レスポンシブ対応
   ================================================================ */

/* タブレット */
@media (max-width: 768px) {
    .header-container {
        padding: 0 12px;
        height: 56px;
    }

    /* Stackスタイルレイアウト用 - タブレット */
    body.stamp-rally-active {
        padding-top: 56px;
    }

    .header-title {
        font-size: 1.125rem;
    }

    .header-back-btn {
        padding: 6px 8px;
        font-size: 0.8rem;
    }

    .header-back-btn span {
        display: none;
    }

    .header-menu-btn {
        width: 40px;
        height: 40px;
    }

    .menu-content {
        width: 280px;
    }

    .menu-header {
        padding: 16px 20px;
    }

    .menu-link {
        padding: 14px 20px 14px 46px;
        /* 左の余白を26px増やして46pxに */
        font-size: 1.25rem;
    }
}

/* スマートフォン */
@media (max-width: 480px) {
    .header-container {
        padding: 0 8px;
        height: 52px;
    }

    /* Stackスタイルレイアウト用 - スマートフォン */
    body.stamp-rally-active {
        padding-top: 52px;
    }

    /* メニューコンテンツの横幅を94%に調整 */
    .menu-content {
        width: 94%;
        left: 6%;
        /* 左側に6%の空白 */
        transform: translateX(100%);
        /* アニメーション開始位置を調整 */
    }

    .header-menu.active .menu-content {
        transform: translateX(0);
    }

    /* メニューヘッダーのレイアウト調整 */
    .menu-header {
        padding: 12px 12px;
        /* 左右のパディングを狭める */
        position: relative;
        /* 相対配置でタイトルを中央に配置 */
    }

    .menu-header h2 {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        /* デフォルトのマージンをリセット */
    }

    .menu-close-btn {
        z-index: 1;
        /* 閉じるボタンを前面に表示 */
    }

    .header-title {
        font-size: 1rem;
    }

    .header-back-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }

    .header-menu-btn {
        width: 36px;
        height: 36px;
    }

    .menu-icon {
        width: 16px;
        height: 12px;
        gap: 2px;
    }

    .menu-content {
        width: 100vw;
        max-width: none;
    }

    .menu-header {
        padding: 12px 16px;
    }

    .menu-header h2 {
        font-size: 1rem;
    }

    .menu-link {
        padding: 12px 16px 12px 42px;
        /* 左の余白を26px増やして42pxに */
        gap: 12px;
        font-size: 1.375rem;
    }

    .menu-link .menu-icon {
        width: 18px;
        height: 18px;
    }
}

/* ================================================================
   ページ共通コンテンツスタイル
   ================================================================ */

/* メインコンテンツ */
.main {
    min-height: 100vh;
    background: var(--stamp-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* セクション共通スタイル */
.campaign-section,
.progress-section,
.filter-section,
.stamps-section,
.rewards-section {
    padding: 24px 0;
}

.campaign-section {
    background: white;
    border-bottom: 1px solid var(--stamp-gray-200);
}

/* セクションヘッダー */
.campaign-header,
.progress-header,
.stamps-header,
.rewards-header {
    margin-bottom: 16px;
}

.campaign-title,
.progress-title,
.stamps-title,
.rewards-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--stamp-gray-800);
}

/* フィルターコントロール */
.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: white;
    border-radius: var(--stamp-border-radius-lg);
    box-shadow: var(--stamp-shadow);
    margin-bottom: 24px;
}

.search-box {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--stamp-gray-300);
    border-radius: var(--stamp-border-radius);
    font-size: 0.875rem;
    transition: var(--stamp-transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--stamp-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--stamp-primary);
    border: none;
    border-radius: var(--stamp-border-radius);
    color: white;
    cursor: pointer;
    transition: var(--stamp-transition);
}

.search-btn:hover {
    background: var(--stamp-primary-dark);
    transform: scale(1.05);
}

.search-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* フィルターボタン */
.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--stamp-gray-100);
    border: 1px solid var(--stamp-gray-300);
    border-radius: var(--stamp-border-radius);
    color: var(--stamp-gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--stamp-transition);
}

.filter-btn:hover {
    background: var(--stamp-gray-200);
    border-color: var(--stamp-gray-400);
}

.filter-btn.active {
    background: var(--stamp-primary);
    border-color: var(--stamp-primary);
    color: white;
}

/* スタンプヘッダー */
.stamps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-controls {
    display: flex;
    gap: 4px;
    background: var(--stamp-gray-100);
    border-radius: var(--stamp-border-radius);
    padding: 4px;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: calc(var(--stamp-border-radius) - 2px);
    color: var(--stamp-gray-600);
    cursor: pointer;
    transition: var(--stamp-transition);
}

.view-btn:hover {
    background: var(--stamp-gray-200);
    color: var(--stamp-gray-800);
}

.view-btn.active {
    background: white;
    color: var(--stamp-primary);
    box-shadow: var(--stamp-shadow-sm);
}

.view-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ローディング・空状態 */
.loading-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--stamp-gray-500);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--stamp-gray-200);
    border-top: 3px solid var(--stamp-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* フッター */
.footer {
    background: var(--stamp-gray-800);
    color: var(--stamp-gray-300);
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid var(--stamp-gray-700);
}

.footer-text {
    margin: 0;
    font-size: 0.875rem;
}

.footer-text a {
    color: var(--stamp-primary);
    text-decoration: none;
    transition: var(--stamp-transition);
}

.footer-text a:hover {
    color: white;
    text-decoration: underline;
}

/* ================================================================
   レスポンシブ対応（コンテンツ）
   ================================================================ */

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .campaign-section,
    .progress-section,
    .filter-section,
    .stamps-section,
    .rewards-section {
        padding: 16px 0;
    }

    .filter-controls {
        padding: 12px;
        margin-bottom: 16px;
    }

    .stamps-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .filter-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }

    .campaign-section,
    .progress-section,
    .filter-section,
    .stamps-section,
    .rewards-section {
        padding: 12px 0;
    }

    .campaign-title,
    .progress-title,
    .stamps-title,
    .rewards-title {
        font-size: 1.125rem;
    }

    .filter-controls {
        gap: 12px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
        height: 40px;
    }

    .filter-buttons {
        gap: 6px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* ================================================================
   スタンプカード・コンポーネント
   ================================================================ */

.stamps-container {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    margin-bottom: 24px;
}

/* リスト表示 */
.stamps-container.list-view {
    grid-template-columns: 1fr;
}

/* スタンプカード */
.stamp-card {
    background: white;
    border-radius: var(--stamp-border-radius-lg);
    box-shadow: var(--stamp-shadow);
    overflow: hidden;
    transition: var(--stamp-transition);
    border: 1px solid var(--stamp-gray-200);
}

.stamp-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--stamp-shadow-lg);
}

/* ================================================================
   アニメーション
   ================================================================ */

/* フェードイン */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* スケールアップ */
@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

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

/* スライドイン */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 8px !important;
}

.mt-2 {
    margin-top: 16px !important;
}

.mt-3 {
    margin-top: 24px !important;
}

.mt-4 {
    margin-top: 32px !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 8px !important;
}

.mb-2 {
    margin-bottom: 16px !important;
}

.mb-3 {
    margin-bottom: 24px !important;
}

.mb-4 {
    margin-bottom: 32px !important;
}

.p-0 {
    padding: 0 !important;
}

.p-1 {
    padding: 8px !important;
}

.p-2 {
    padding: 16px !important;
}

.p-3 {
    padding: 24px !important;
}

.p-4 {
    padding: 32px !important;
}

/* ================================================================
   設定ページ専用スタイル
   ================================================================ */

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.settings-item-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px;
    background: white;
    border: 1px solid var(--stamp-gray-200);
    border-radius: var(--stamp-border-radius-lg);
    box-shadow: var(--stamp-shadow);
    cursor: pointer;
    transition: var(--stamp-transition);
    text-align: left;
}

.settings-item-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--stamp-shadow-md);
    border-color: var(--stamp-primary);
}

.settings-item-button:active {
    transform: translateY(0);
}

.settings-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--stamp-border-radius);
    background: var(--stamp-primary);
    margin-right: 16px;
    flex-shrink: 0;
}

.settings-icon .icon {
    width: 24px;
    height: 24px;
    fill: white;
}

.settings-content {
    flex: 1;
    min-width: 0;
}

.settings-label {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--stamp-gray-800);
}

.settings-description {
    margin: 0;
    font-size: 0.875rem;
    color: var(--stamp-gray-500);
    line-height: 1.4;
}

.settings-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 16px;
    flex-shrink: 0;
}

.settings-arrow .icon {
    width: 16px;
    height: 16px;
    fill: var(--stamp-gray-400);
    transition: var(--stamp-transition);
}

.settings-item-button:hover .settings-arrow .icon {
    fill: var(--stamp-primary);
    transform: translateX(2px);
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .settings-item-button {
        padding: 12px;
    }

    .settings-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }

    .settings-icon .icon {
        width: 20px;
        height: 20px;
    }

    .settings-label {
        font-size: 0.9rem;
    }

    .settings-description {
        font-size: 0.8rem;
    }
}

/* ================================================================
   【スタンプラリー】チェックインエリア QRボタン機能
   ================================================================ */


.stamp-rally-qr-button {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 9998;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 6px 16px;

    box-shadow: var(--stamp-shadow-lg);
    cursor: pointer;

    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.stamp-rally-qr-button.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* QRボタンホバー効果 */

.stamp-rally-qr-button:hover {
    box-shadow: var(--stamp-shadow-xl);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
}

.stamp-rally-qr-button:active {}


.qr-button-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.map-marker-icon {
    width: 20px;
    height: 20px;
    fill: white;
    flex-shrink: 0;
}

.qr-icon {
    width: 20px;
    height: 20px;
    fill: white;
    flex-shrink: 0;
}

.qr-button-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1.2;
    width: 100%;
}

.qr-button-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qr-button-distance {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 400;
}

/* アイコンサイズ（モバイル対応は下の新しいコンテナルールに移行） */
@media (max-width: 480px) {
    .qr-button-content {
        gap: 6px;
    }

    .map-marker-icon {
        width: 16px;
        height: 16px;
    }

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

    .qr-button-title {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .qr-button-content {
        gap: 4px;
    }

    .map-marker-icon {
        width: 14px;
        height: 14px;
    }

    .qr-icon {
        width: 14px;
        height: 14px;
    }

    .qr-button-title {
        font-size: 10px;
    }
}

/* ================================================================
   【スタンプラリー】現在地ボタンの表示制御
   ================================================================ */

/* スタンプラリーモードでは右下の現在地ボタンを非表示（独立ボタンを表示するため） */
body.stamp-rally-active .map .currentLocation {
    display: none !important;
}

/* 独立した現在地ボタン（常に表示） */
.stamp-rally-standalone-location-button {
    position: fixed;
    top: 70px;
    right: 16px;
    z-index: 9998;

    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    width: 56px;
    height: 56px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;

    opacity: 0;
    transform: translateY(-50px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.stamp-rally-standalone-location-button.show {
    opacity: 1;
    transform: translateY(0);
}

.stamp-rally-standalone-location-button:hover {
    border-color: #ccc;
    background: #f9f9f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stamp-rally-standalone-location-button:active {}

.stamp-rally-standalone-location-button.on {
    background: #f0f0f0;
    border-color: #bbb;
}

/* Flutter風Column レイアウト */
.stamp-rally-standalone-location-button .location-button-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
}

.stamp-rally-standalone-location-button .location-icon {
    width: 20px;
    height: 20px;
    stroke: #666;
    stroke-width: 2px;
    fill: none;
}

.stamp-rally-standalone-location-button .location-button-text {
    font-size: 10px;
    font-weight: 600;
    color: #666;
    line-height: 1;
    margin: 0;
    text-align: center;
}

.stamp-rally-standalone-location-button.on .location-icon {
    stroke: #555;
    fill: none;
}

.stamp-rally-standalone-location-button.on .location-button-text {
    color: #555;
}

/* モバイル対応 */
@media (max-width: 480px) {
    .stamp-rally-qr-button {
        top: 60px;
        min-width: 180px;
        padding: 4px 12px;
        min-height: 40px;
    }

    /* 独立現在地ボタンのモバイル対応 */
    .stamp-rally-standalone-location-button {
        top: 60px;
        right: 16px;
        width: 50px;
        height: 50px;
        padding: 5px;
    }

    .stamp-rally-standalone-location-button .location-icon {
        width: 18px;
        height: 18px;
    }

    .stamp-rally-standalone-location-button .location-button-text {
        font-size: 9px;
    }
}

@media (max-width: 360px) {
    .stamp-rally-qr-button {
        top: 55px;
        min-width: 160px;
        padding: 4px 10px;
        min-height: 38px;
    }

    /* 独立現在地ボタンの小画面対応 */
    .stamp-rally-standalone-location-button {
        top: 55px;
        right: 16px;
        width: 46px;
        height: 46px;
        padding: 4px;
    }

    .stamp-rally-standalone-location-button .location-icon {
        width: 16px;
        height: 16px;
    }

    .stamp-rally-standalone-location-button .location-button-text {
        font-size: 8px;
    }
}

/* ================================================================
   【スタンプラリー】QR読み取りページボタン
   ================================================================ */

/* QR読み取りページボタン（画面左側固定） */
.stamp-rally-qr-reader-button {
    position: fixed;
    top: 70px;
    left: 16px;
    z-index: 9998;

    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    width: 56px;
    height: 56px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;

    opacity: 0;
    transform: translateY(-50px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.stamp-rally-qr-reader-button.show {
    opacity: 1;
    transform: translateY(0);
}

.stamp-rally-qr-reader-button:hover {
    border-color: #ccc;
    background: #f9f9f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stamp-rally-qr-reader-button:active {}

.stamp-rally-qr-reader-button.on {
    background: #f0f0f0;
    border-color: #bbb;
}

/* Flutter風Column レイアウト */
.stamp-rally-qr-reader-button .qr-button-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
}

.stamp-rally-qr-reader-button .qr-icon {
    width: 20px;
    height: 20px;
    stroke: #666;
    stroke-width: 2px;
    fill: none;
}

.stamp-rally-qr-reader-button .qr-button-text {
    font-size: 10px;
    font-weight: 600;
    color: #666;
    line-height: 1;
    margin: 0;
    text-align: center;
}

.stamp-rally-qr-reader-button.on .qr-icon {
    stroke: #555;
    fill: none;
}

.stamp-rally-qr-reader-button.on .qr-button-text {
    color: #555;
}

/* モバイル対応 */
@media (max-width: 480px) {
    .stamp-rally-qr-reader-button {
        top: 60px;
        left: 16px;
        width: 50px;
        height: 50px;
        padding: 5px;
    }

    .stamp-rally-qr-reader-button .qr-icon {
        width: 18px;
        height: 18px;
    }

    .stamp-rally-qr-reader-button .qr-button-text {
        font-size: 9px;
    }
}

@media (max-width: 360px) {
    .stamp-rally-qr-reader-button {
        top: 55px;
        left: 16px;
        width: 46px;
        height: 46px;
        padding: 4px;
    }

    .stamp-rally-qr-reader-button .qr-icon {
        width: 16px;
        height: 16px;
    }

    .stamp-rally-qr-reader-button .qr-button-text {
        font-size: 8px;
    }
}

/* ================================================================
   スタンプ獲得済み表示 - タスキデザイン
   ================================================================ */
.stamp-acquired-sash {
    position: absolute;
    top: 8px;
    left: 16px;
    background: var(--stamp-danger);
    color: white;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    border-radius: 4px;
    box-shadow: var(--stamp-shadow-md);
    white-space: nowrap;
}

/* 画像コンテナのposition設定 */
.stamp-acquired-card .photo {
    position: relative;
    overflow: hidden;
    border-radius: var(--stamp-border-radius);
}

/* ================================================================
   マーカーの獲得済みバッジ
   ================================================================ */
.stamp-get-badge {
    position: absolute;
    top: -22px;
    right: -22px;
    z-index: 10;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    animation: stampPulse 2s ease-in-out infinite;
}

.stamp-get-badge img {
    display: block;
    width: 34px !important;
    height: 34px !important;
    transform: rotate(12deg);
}

/* @keyframes stampPulse {

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

    50% {
        transform: scale(1.05);
    }
} */

/* 獲得済みマーカーのスタイル */
.markerWrap.stamp-acquired {
    opacity: 0.85;
    position: relative;
}

.markerWrap.stamp-acquired .marker {
    filter: grayscale(0.2) brightness(0.95);
    transform: scale(0.98);
    transition: all 0.3s ease;
}

.markerWrap.stamp-acquired .marker img {
    border-radius: 4px;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .stamp-acquired-sash {
        font-size: 10px;
        padding: 3px 6px;
        top: 6px;
        left: 8px;
        border-radius: 3px;
    }

    .stamp-get-badge {
        top: -20px;
        right: -22px;

        /* padding: 2px; */
    }

    .stamp-get-badge img {
        width: 34px !important;
        height: 34px !important;
    }
}