/* =============================================
   街道ツアーページ
   ============================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    height: 100%;
    min-height: 100dvh;
    font-family: 'Noto Sans JP', sans-serif;
    background: #0a0806;
    color: #f5e6d3;
    overflow: hidden;
}

/* ── ヘッダー ── */
.tour-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 8, 6, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(201, 169, 110, 0.15);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.tour-header-inner {
    padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px
        max(12px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tour-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.tour-header-left img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #c9a84c;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-header-left:hover img {
    transform: rotate(10deg) scale(1.1);
}

.tour-header-title {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #f5e6d3, #c9a96e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tour-header-title span {
    font-size: 11px;
    font-weight: 400;
    -webkit-text-fill-color: #888;
}

.tour-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.tour-back-btn {
    padding: 6px 12px;
    border: 1px solid rgba(201, 169, 110, 0.3);
    border-radius: 10px;
    background: rgba(201, 169, 110, 0.08);
    color: #c9a96e;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.tour-back-btn:hover {
    background: rgba(201, 169, 110, 0.2);
}

/* ── コースタブ ── */
.tour-tabs {
    display: flex;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.tour-tab {
    flex: 1;
    padding: 7px 10px;
    border: 1.5px solid rgba(201, 169, 110, 0.12);
    border-radius: 10px;
    background: rgba(201, 169, 110, 0.04);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: rgba(245, 230, 211, 0.4);
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tour-tab.active {
    border-color: rgba(201, 169, 110, 0.5);
    background: rgba(201, 169, 110, 0.12);
    color: #c9a96e;
    box-shadow: 0 0 12px rgba(201, 169, 110, 0.08);
}

.tour-tab:hover:not(.active) {
    background: rgba(201, 169, 110, 0.08);
    color: rgba(245, 230, 211, 0.6);
}

/* ── メインレイアウト ── */
.tour-main {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    /* モバイル: 上下分割 */
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr;
    padding-top: calc(80px + env(safe-area-inset-top));
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
}

/* ── 地図パネル ── */
.tour-map-panel {
    position: relative;
    overflow: hidden;
}

#tour-map {
    width: 100%;
    height: 100%;
}

#tour-map .maplibregl-ctrl-bottom-left,
#tour-map .maplibregl-ctrl-bottom-right {
    bottom: 4px;
}

/* 地図上の宿場インジケーター */
.tour-map-station-badge {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: rgba(10, 8, 6, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(201, 169, 110, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #c9a96e;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.3s;
}

.tour-edo-opacity-ctrl {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(201, 169, 110, 0.28);
    border-radius: 10px;
    background: rgba(10, 8, 6, 0.82);
    color: #f5e6d3;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.25s;
}

.tour-edo-opacity-ctrl.hidden {
    opacity: 0;
    pointer-events: none;
}

.tour-edo-opacity-ctrl input[type='range'] {
    width: 90px;
    accent-color: #c9a96e;
}

.tour-edo-opacity-val {
    min-width: 34px;
    text-align: right;
    color: #c9a96e;
}

@media (max-width: 767px) {
    .tour-map-station-badge {
        bottom: auto;
        top: 12px;
        left: 50%;
        max-width: clamp(96px, 34vw, 220px);
        transform: translateX(-50%);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tour-edo-opacity-ctrl {
        left: 8px;
        gap: 6px;
        padding: 7px 8px;
    }

    .tour-edo-opacity-ctrl input[type='range'] {
        width: 64px;
    }
}

@media (max-width: 480px) {
    .tour-map-station-badge {
        max-width: clamp(88px, 34vw, 150px);
        padding: 6px 10px;
    }

    .tour-edo-opacity-ctrl > span:first-child {
        display: none;
    }

    .tour-edo-opacity-val {
        min-width: 30px;
    }
}

/* ── 浮世絵パネル ── */
.tour-ukiyoe-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #0e0b08 0%, #161210 100%);
    border-top: 1px solid rgba(201, 169, 110, 0.12);
    overflow: hidden;
}

.tour-ukiyoe-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 169, 110, 0.2) transparent;
}

.tour-ukiyoe-content::-webkit-scrollbar {
    width: 4px;
}

.tour-ukiyoe-content::-webkit-scrollbar-thumb {
    background: rgba(201, 169, 110, 0.2);
    border-radius: 2px;
}

/* 浮世絵画像 */
.tour-image-wrap {
    position: relative;
    width: 100%;
    background: #0a0806;
    cursor: zoom-in;
    overflow: hidden;
    flex-shrink: 0;
}

.tour-image-wrap img {
    width: 100%;
    display: block;
    max-height: 50vh;
    object-fit: contain;
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}

.tour-image-wrap img.tour-img-loading {
    opacity: 0;
    transform: scale(0.98);
}

.tour-image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, #0e0b08, transparent);
    pointer-events: none;
}

/* 浮世絵スライドショードット */
.tour-slideshow {
    position: relative;
}

.tour-slide-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 5;
}

.tour-slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    padding: 0;
}

.tour-slide-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.tour-slide-dot.active {
    background: #fff;
    transform: scale(1.25);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

/* 浮世絵情報 */
.tour-info {
    padding: 16px 20px 20px;
}

.tour-station-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(201, 169, 110, 0.12);
    border: 1px solid rgba(201, 169, 110, 0.25);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #c9a96e;
    margin-bottom: 10px;
}

.tour-station-name {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #f5e6d3, #d4b678);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tour-ukiyoe-title {
    font-size: 13px;
    color: rgba(245, 230, 211, 0.5);
    margin-bottom: 14px;
}

.tour-description {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(245, 230, 211, 0.7);
}

.tour-description .desc-title {
    font-size: 15px;
    font-weight: 700;
    color: #c9a96e;
    margin: 16px 0 6px;
}

.tour-description .desc-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: rgba(201, 169, 110, 0.8);
    margin: 12px 0 4px;
}

.tour-description .desc-body {
    margin-bottom: 8px;
}

.tour-description .desc-quote {
    padding: 8px 12px;
    margin: 8px 0;
    border-left: 3px solid rgba(201, 169, 110, 0.3);
    background: rgba(201, 169, 110, 0.05);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: rgba(245, 230, 211, 0.6);
}

.tour-description .desc-list {
    padding-left: 4px;
    margin: 4px 0;
}

/* データなし表示 */
.tour-no-data {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
}

.tour-no-data-icon {
    font-size: 48px;
    opacity: 0.3;
}

.tour-no-data-text {
    font-size: 14px;
    color: rgba(245, 230, 211, 0.4);
    line-height: 1.6;
}

/* ── ナビゲーションバー ── */
.tour-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 8, 6, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(201, 169, 110, 0.15);
    padding: 10px max(16px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.tour-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid rgba(201, 169, 110, 0.3);
    border-radius: 12px;
    background: rgba(201, 169, 110, 0.08);
    color: #c9a96e;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tour-nav-btn:hover:not(:disabled) {
    background: rgba(201, 169, 110, 0.2);
    border-color: rgba(201, 169, 110, 0.5);
    transform: translateY(-1px);
}

.tour-nav-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.tour-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.tour-autoplay-btn,
.tour-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid rgba(201, 169, 110, 0.3);
    border-radius: 12px;
    background: rgba(201, 169, 110, 0.08);
    color: #c9a96e;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tour-autoplay-btn:hover,
.tour-view-btn:hover {
    background: rgba(201, 169, 110, 0.2);
    border-color: rgba(201, 169, 110, 0.5);
    transform: translateY(-1px);
}

.tour-autoplay-btn:active,
.tour-view-btn:active {
    transform: scale(0.97);
}

.tour-autoplay-btn.playing,
.tour-view-btn.active {
    background: rgba(201, 169, 110, 0.18);
    border-color: #c9a96e;
    color: #fff;
    box-shadow: 0 0 10px rgba(201, 169, 110, 0.25);
}

.tour-view-icon {
    line-height: 1;
}

.tour-nav-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.tour-nav-counter-num {
    font-size: 16px;
    font-weight: 800;
    color: #c9a96e;
    letter-spacing: 0.02em;
}

.tour-nav-counter-label {
    font-size: 10px;
    color: rgba(245, 230, 211, 0.35);
    margin-top: 1px;
}

/* ── 宿場リストパネル ── */
.tour-station-list-btn {
    position: fixed;
    bottom: calc(70px + env(safe-area-inset-bottom));
    right: max(12px, env(safe-area-inset-right));
    z-index: 900;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(201, 169, 110, 0.3);
    background: rgba(10, 8, 6, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #c9a96e;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.tour-station-list-btn:hover {
    background: rgba(201, 169, 110, 0.15);
    transform: scale(1.05);
}

.tour-station-list-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(10, 8, 6, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.tour-station-list-overlay.show {
    display: flex;
    opacity: 1;
}

.tour-station-list-panel {
    width: 100%;
    max-width: 480px;
    max-height: 70vh;
    background: linear-gradient(180deg, #1a1610, #0e0b08);
    border-top: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-station-list-overlay.show .tour-station-list-panel {
    transform: translateY(0);
}

.tour-station-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.1);
}

.tour-station-list-title {
    font-size: 15px;
    font-weight: 700;
    color: #c9a96e;
}

.tour-station-list-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(201, 169, 110, 0.1);
    color: #c9a96e;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.tour-station-list-close:hover {
    background: rgba(201, 169, 110, 0.2);
}

.tour-station-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px 20px;
    -webkit-overflow-scrolling: touch;
}

.tour-station-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: rgba(245, 230, 211, 0.6);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}

.tour-station-list-item:hover {
    background: rgba(201, 169, 110, 0.08);
}

.tour-station-list-item.active {
    background: rgba(201, 169, 110, 0.12);
    color: #c9a96e;
}

.tour-station-list-item.has-ukiyoe .tour-list-name {
    color: #f5e6d3;
}

.tour-list-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(201, 169, 110, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.tour-station-list-item.active .tour-list-num {
    background: rgba(201, 169, 110, 0.3);
    color: #c9a96e;
}

.tour-list-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tour-list-status {
    font-size: 11px;
    opacity: 0.5;
    flex-shrink: 0;
}

/* ── マーカー ── */
.tour-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(201, 169, 110, 0.3);
    border: 2px solid rgba(201, 169, 110, 0.5);
    cursor: pointer;
    transform-origin: center center;
    transition:
        background-color 0.2s,
        border-color 0.2s,
        opacity 0.15s;
}

.tour-marker:hover {
    background: rgba(201, 169, 110, 0.5);
}

.tour-marker-active {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #c9a96e;
    border: 3px solid #fff;
    box-shadow:
        0 0 16px rgba(201, 169, 110, 0.6),
        0 0 32px rgba(201, 169, 110, 0.3);
    cursor: pointer;
    transform-origin: center center;
    animation: tour-marker-pulse 2s infinite;
    transition: opacity 0.15s;
}

@keyframes tour-marker-pulse {
    0%,
    100% {
        box-shadow:
            0 0 16px rgba(201, 169, 110, 0.6),
            0 0 32px rgba(201, 169, 110, 0.3);
    }
    50% {
        box-shadow:
            0 0 24px rgba(201, 169, 110, 0.8),
            0 0 48px rgba(201, 169, 110, 0.4);
    }
}

/* ── ローディング ── */
.tour-loading {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #0a0806;
    transition: opacity 0.5s;
}

.tour-loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

.tour-loading-icon {
    font-size: 48px;
    animation: tour-loading-bounce 1.2s ease-in-out infinite;
}

@keyframes tour-loading-bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.tour-loading-text {
    font-size: 14px;
    color: rgba(245, 230, 211, 0.5);
}

/* ── トーストなど ── */
.toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(60px);
    padding: 10px 20px;
    background: rgba(42, 34, 26, 0.92);
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: 12px;
    color: #f5e6d3;
    font-size: 13px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── 画像プレビュー（game.css から再利用） ── */
.image-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.image-preview-overlay.show {
    display: flex;
}

.image-preview-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.1s;
    user-select: none;
    -webkit-user-select: none;
}

.image-preview-overlay img.zoomed {
    cursor: grab;
}

.image-preview-overlay img.dragging {
    cursor: grabbing;
    transition: none;
}

.preview-close {
    position: absolute;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

.preview-close:hover {
    opacity: 1;
}

.preview-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 42px;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

.preview-nav.show {
    display: flex;
}

.preview-nav:hover {
    background: rgba(0, 0, 0, 0.6);
}

.preview-nav-prev {
    left: max(16px, env(safe-area-inset-left));
}

.preview-nav-next {
    right: max(16px, env(safe-area-inset-right));
}

.preview-title {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 14px;
    opacity: 0.7;
    pointer-events: none;
}

.preview-counter {
    position: absolute;
    bottom: 36px;
    left: 0;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    display: none;
}

.preview-counter.show {
    display: block;
}

.zoom-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.zoom-indicator.show {
    opacity: 1;
}

/* ── PC レイアウト（768px以上） ── */
@media (min-width: 768px) {
    .tour-main {
        grid-template-rows: 1fr;
        grid-template-columns: 1fr 1fr;
    }

    .tour-ukiyoe-panel {
        border-top: none;
        border-left: 1px solid rgba(201, 169, 110, 0.12);
    }

    .tour-image-wrap img {
        max-height: 45vh;
    }

    .tour-station-name {
        font-size: 26px;
    }

    .tour-nav-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* ── 大画面PC ── */
@media (min-width: 1200px) {
    .tour-main {
        grid-template-columns: 3fr 2fr;
    }

    .tour-info {
        padding: 20px 28px 28px;
    }
}

/* ── 小画面スマホ ── */
@media (max-width: 480px) {
    .tour-header-inner {
        gap: 8px;
    }

    .tour-tabs {
        order: 10;
        width: 100%;
    }

    .tour-tab {
        font-size: 11px;
        padding: 6px 8px;
    }

    .tour-station-name {
        font-size: 18px;
    }

    .tour-nav-btn {
        padding: 8px;
        font-size: 11px;
    }

    .tour-nav {
        gap: 6px;
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }

    .tour-autoplay-btn,
    .tour-view-btn {
        padding: 8px;
        font-size: 11px;
    }

    .tour-view-label {
        display: none;
    }

    .tour-nav-counter {
        min-width: 46px;
    }

    .tour-nav-counter-num {
        font-size: 13px;
    }

    .tour-info {
        padding: 12px 16px 16px;
    }
}

/* ── アニメーション ── */
.tour-fade-enter {
    animation: tourFadeIn 0.35s ease both;
}

@keyframes tourFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* アカウント設定モーダル（他ページからコピー） */
.account-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 8, 6, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
}

.account-modal-overlay.show {
    display: flex;
}

/* =============================================
   ベースマップ切替コントロール
   ============================================= */
.basemap-switcher {
    display: flex !important;
    flex-direction: row !important;
    overflow: hidden;
    border-radius: 6px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

.basemap-switcher button {
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #555;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Noto Sans JP', sans-serif;
    padding: 8px 16px;
    min-width: 80px;
    text-align: center;
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s;
    line-height: 1;
    white-space: nowrap;
}

.basemap-switcher button:not(:last-child) {
    border-right: 1px solid #ddd;
}

.basemap-switcher button:hover {
    background: rgba(240, 240, 240, 0.95);
}

.basemap-switcher button.active,
.basemap-switcher button.active:hover,
.basemap-switcher button.active:focus,
.basemap-switcher button.active:active {
    background: #3b82f6 !important;
    color: #fff !important;
}

.basemap-switcher button:active {
    background: rgba(59, 130, 246, 0.16);
}

/* =============================================
   マップ左下のコントロール横並び化 (Basemap & Terrain)
   ============================================= */
#tour-map .maplibregl-ctrl-bottom-left {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#tour-map .maplibregl-ctrl-bottom-left .maplibregl-ctrl {
    margin: 0 0 10px 10px !important;
    clear: none !important;
    float: none !important;
}

@media (max-width: 600px) {
    #tour-map .maplibregl-ctrl-bottom-left {
        max-width: calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right));
        flex-wrap: wrap !important;
    }

    .basemap-switcher button {
        min-width: 64px;
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* =============================================
   建物3D コントロールボタン
   ============================================= */
.building-3d-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: #333;
    transition:
        color 0.2s,
        background 0.2s;
    border-radius: 4px;
}

.building-3d-ctrl-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.building-3d-ctrl-btn.active {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* =============================================
   ラベル表示コントロールボタン
   ============================================= */
.label-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: #333;
    transition:
        color 0.2s,
        background 0.2s;
    border-radius: 4px;
}

.label-ctrl-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.label-ctrl-btn.active {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}
