/* ========================================
   CSS変数定義
   ======================================== */
:root {
    /* カラーパレット */
    --color-bg-ryoseikoku: #264348;
    --color-bg-default: #C9BA96;
    --color-white: #ffffff;
    --color-dark: #333333;
    --color-gray-light: #dddddd;
    --color-gray-medium: #888888;
    --color-gray-dark: #666666;
    --color-gray-darker: #555555;
    --color-border: #e0e0e0;
    
    /* 透明度 */
    --opacity-overlay: 0.95;
    --opacity-overlay-max: 0.98;
    --opacity-hover: 0.6;
    
    /* サイズ */
    --header-height: 36px;
    --menu-width: 280px;
    --menu-max-height: calc(70vh + 200px);
    --control-btn-size: 32px;
    --control-btn-size-lg: 36px;
    
    /* スペーシング */
    --spacing-xs: 4px;
    --spacing-sm: 6px;
    --spacing-md: 8px;
    --spacing-lg: 10px;
    --spacing-xl: 12px;
    --spacing-2xl: 16px;
    --spacing-3xl: 20px;
    
    /* 境界線 */
    --border-radius-sm: 4px;
    --border-radius-md: 5px;
    --border-radius-lg: 6px;
    --border-radius-xl: 10px;
    --border-width: 2px;
    
    /* シャドウ */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.25);
    
    /* トランジション */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s ease;
    
    /* フォント */
    --font-size-xs: 12px;
    --font-size-sm: 13px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 22px;
}

/* ========================================
   基本設定
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-bg-default);
    touch-action: pan-x pan-y;
    -ms-touch-action: pan-x pan-y;
}

button {
    touch-action: manipulation;
    -ms-touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* ========================================
   地図コンテナ
   ======================================== */
#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   SVGマーカーレイヤー
   ======================================== */
#marker-lines-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
    overflow: visible;
}

#interactive-markers {
    pointer-events: all;
}

/* ========================================
   サイトヘッダー
   ======================================== */
.site-header {
    position: absolute;
    top: 20px;
    left: 66px;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    height: var(--header-height);
    z-index: 2000;
    transition: opacity var(--transition-normal);
}

.site-header:hover {
    opacity: 1;
}

.site-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: rgba(51, 51, 51, var(--opacity-hover));
    margin: 0;
    letter-spacing: 0.5px;
    line-height: 1;
    transition: color var(--transition-normal);
}

.site-header:hover .site-title {
    color: rgba(51, 51, 51, 1);
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: none;
    color: rgba(51, 51, 51, var(--opacity-hover));
    text-decoration: none;
    font-size: var(--font-size-lg);
    font-weight: bold;
    transition: all var(--transition-normal);
}

.info-icon:hover {
    color: rgba(51, 51, 51, 1);
    transform: scale(1.15);
}

/* 点数変化の表示 */
.score-change {
    position: absolute;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 900;
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 
        -2px -2px 0 #fff,
        2px -2px 0 #fff,
        -2px 2px 0 #fff,
        2px 2px 0 #fff,
        -2px 0 0 #fff,
        2px 0 0 #fff,
        0 -2px 0 #fff,
        0 2px 0 #fff,
        0 0 8px rgba(255, 255, 255, 0.9),
        0 0 12px rgba(255, 255, 255, 0.7),
        0 2px 6px rgba(0, 0, 0, 0.6);
    animation: score-popup 1s ease-out forwards;
    z-index: 1000;
}

.score-change.positive {
    color: #1976D2;
}

.score-change.negative {
    color: #D32F2F;
}

@keyframes score-popup {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1.1);
    }
    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(-5px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px) scale(0.9);
    }
}

/* トラッキングカード用の点数変化表示 */
.tracking-card-score-change {
    font-size: 16px;
}

/* ========================================
   ハンバーガーメニュー
   ======================================== */
#menu-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2000;
}

.hamburger-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    touch-action: manipulation;
    -ms-touch-action: manipulation;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #333;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(4.25px, 4.25px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4.25px, -4.25px);
}

/* メニューパネル */
.menu-panel {
    position: absolute;
    top: 46px;
    left: 0;
    width: 280px;
    max-height: calc(70vh + 200px);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    padding: 16px;
    overflow-y: auto;
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.menu-panel.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.menu-panel h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.menu-section {
    margin-bottom: 20px;
}

.menu-section h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
}

.menu-section label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.2s ease;
    font-size: 13px;
}

.menu-section label:hover {
    color: #007bff;
}

.menu-section input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* トグルスイッチ */
.toggle-switch {
    display: flex;
    gap: 6px;
}

.toggle-btn {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    border-color: #888;
    color: #555;
}

.toggle-btn.active {
    background: #666;
    color: white;
    border-color: #666;
}

/* 背景地図トグル（2×2グリッド） */
.map-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.map-toggle .toggle-btn {
    padding: 8px 8px;
    font-size: 12px;
}

/* ネタバレフィルタ */
.menu-section label[for="spoiler-filter"] {
    display: block;
    margin-bottom: 6px;
    padding: 0;
    font-size: 13px;
}

.spoiler-select {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.spoiler-select:hover {
    border-color: #888;
}

.spoiler-select:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(102, 102, 102, 0.1);
}

/* キャラクターフィルタ */
#character-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ========================================
   タイムラインスライダー
   ======================================== */
.timeline-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    z-index: 2000;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.timeline-container:hover {
    opacity: 1;
}

.control-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #666;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    touch-action: manipulation;
    -ms-touch-action: manipulation;
}

.control-btn:hover {
    background: #555;
    transform: scale(1.05);
}

.control-btn:active {
    transform: scale(0.95);
}

.speed-display {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    padding: 0 6px;
    flex-shrink: 0;
    min-width: 40px;
    text-align: center;
}

.timeline-slider {
    width: 300px;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    flex-shrink: 0;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #666;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(102, 102, 102, 0.5);
}

.timeline-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #666;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.timeline-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(102, 102, 102, 0.5);
}

.current-datetime {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    padding: 0 4px;
    flex-shrink: 0;
    min-width: 90px;
}

.datetime-date {
    white-space: nowrap;
}

.datetime-time {
    white-space: nowrap;
    font-size: 11px;
    color: #666;
}

/* ========================================
   天文アイコン（絵文字）
   ======================================== */
.astronomy-icon {
    flex-shrink: 0;
    margin-left: 4px;
    font-size: 24px;
    line-height: 1;
    cursor: default;
    transition: transform 0.3s ease;
    /* ハロ効果（光彩）で絵文字をくっきり表示 */
    text-shadow: 
        0 0 3px rgba(0, 0, 0, 1);
}

.astronomy-icon:hover {
    transform: scale(1.15);
    text-shadow: 
        0 0 4px rgba(0, 0, 0, 1);
}

/* ========================================
   スクロールバーのスタイリング
   ======================================== */
.menu-panel::-webkit-scrollbar {
    width: 8px;
}

.menu-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.menu-panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.menu-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ========================================
   キャラクターフィルタ
   ======================================== */
.character-filter-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.character-filter-btn {
    flex: 1;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f0f0f0;
    color: #333;
}

.character-filter-btn:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.character-filter-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

#character-filters {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px; /* 初期値、JavaScriptで動的に調整される */
    overflow-y: auto;
    overflow-x: hidden; /* 横スクロールバーを無効化 */
    padding: 2px;
}

.character-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    height: 48px; /* 固定高さ（アイコン32px + パディング上下8px×2） */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    background: #f8f8f8;
    position: relative;
    overflow: hidden;
}

.character-filter-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 0;
}

.character-filter-item > * {
    position: relative;
    z-index: 1;
}

.character-filter-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.character-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.25s ease;
    /* 外縁円（白） */
    background: white;
}

.character-name {
    flex: 1;
    color: #333;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.25s ease;
}

/* アクティブ状態（ON） */
.character-filter-item.active {
    background: currentColor;
    border-color: transparent;
}

.character-filter-item.active::before {
    opacity: 0.15;
}

.character-filter-item.active .character-name {
    font-weight: 700;
    color: white;
}

.character-filter-item.active .character-icon-badge {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* 非アクティブ状態（OFF） */
.character-filter-item:not(.active) {
    background: #f5f5f5;
    border-color: transparent;
}

.character-filter-item:not(.active):hover {
    background: #ececec;
}

.character-filter-item:not(.active) .character-icon-badge {
    opacity: 0.5;
}

.character-filter-item:not(.active) .character-name {
    color: #666;
}

/* スクロールバー */
#character-filters::-webkit-scrollbar {
    width: 6px;
}

#character-filters::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#character-filters::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

#character-filters::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ========================================
   キャラクタートラッキングカード
   ======================================== */
.tracking-card {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    height: 160px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    z-index: 900;
    backdrop-filter: blur(10px);
    border: 3px solid var(--tracking-color, rgba(139, 69, 19, 0.3));
    overflow: visible;
}

.tracking-nav {
    position: absolute;
    top: 55%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--tracking-color, rgba(139, 69, 19, 0.3));
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tracking-nav:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.tracking-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.tracking-nav-prev {
    left: -20px;
}

.tracking-nav-next {
    right: -20px;
}


.tracking-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(139, 69, 19, 0.3);
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.tracking-close:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.tracking-content {
    padding: 12px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tracking-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(139, 69, 19, 0.2);
    margin-bottom: 8px;
    flex-shrink: 0;
}

.tracking-id {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    background: rgba(139, 69, 19, 0.1);
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tracking-name {
    font-size: 16px;
    font-weight: 700;
    color: #8B4513;
    margin: 0;
    line-height: 1.3;
    flex-grow: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tracking-score {
    font-size: 14px;
    font-weight: 700;
    color: #D2691E;
    background: rgba(210, 105, 30, 0.1);
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tracking-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
    overflow: visible;
}

.tracking-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    overflow: visible;
    flex-grow: 1;
    min-height: 0;
}

.tracking-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
}

.tracking-value {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
    overflow-y: scroll;
    height: 100%;
    padding-right: 4px;
    white-space: pre-line;
}

/* スクロールバー（カード内情報エリア） */
.tracking-value::-webkit-scrollbar {
    width: 4px;
}

.tracking-value::-webkit-scrollbar-track {
    background: transparent;
}

.tracking-value::-webkit-scrollbar-thumb {
    background: rgba(139, 69, 19, 0.3);
    border-radius: 2px;
}

.tracking-value::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 69, 19, 0.5);
}

/* ========================================
   レスポンシブ対応（スマホ版）
   ======================================== */
@media (max-width: 768px) {
    /* サイトヘッダーの調整 */
    .site-header {
        top: 10px;
        left: 44px;
        gap: 4px;
        height: auto;
    }
    
    .site-title {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .info-icon {
        width: 16px;
        height: 16px;
        font-size: 13px;
    }
    
    /* ハンバーガーメニューコンテナの調整 */
    #menu-container {
        top: 10px;
        left: 10px;
    }
    
    /* ハンバーガーボタンの調整 */
    .hamburger-btn {
        width: 28px;
        height: 28px;
        padding: 6px;
        gap: 3px;
    }
    
    .hamburger-btn span {
        width: 16px;
        height: 2px;
    }
    
    /* ハンバーガーボタンのアクティブ状態（×印）の調整 */
    .hamburger-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(3.4px, 3.4px);
    }
    
    .hamburger-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(3.4px, -3.4px);
    }
    
    /* メニューパネルのフォントサイズ調整 */
    .menu-panel {
        font-size: 12px;
        padding: 12px;
    }
    
    .menu-section {
        margin-bottom: 12px;
    }
    
    .menu-section h4 {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .menu-section label {
        font-size: 11px;
        padding: 3px 0;
    }
    
    .menu-section input[type="checkbox"] {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }
    
    /* トグルボタンのサイズ調整 */
    .toggle-btn {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .map-toggle .toggle-btn {
        padding: 6px 6px;
        font-size: 10px;
    }
    
    /* セレクトボックスのサイズ調整 */
    .spoiler-select {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    /* キャラクターフィルタのサイズ調整 */
    .character-filter-item {
        height: 36px;
        padding: 6px 10px;
        gap: 8px;
    }
    
    .character-icon-badge {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .character-name {
        font-size: 12px;
    }
    
    /* タイムラインコンテナの調整 */
    .timeline-container {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 20px;
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 10px;
        row-gap: 8px;
    }
    
    /* コントロールボタンのサイズ調整 */
    .control-btn {
        order: 1;
        width: 24px;
        height: 24px;
        font-size: 9px;
    }
    
    /* 速度表示の調整 */
    .speed-display {
        order: 2;
        font-size: 10px;
        min-width: 30px;
        padding: 0 4px;
    }
    
    /* 日時表示を再生ボタンの右横に配置（縦並び） */
    .current-datetime {
        order: 3;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        font-size: 10px;
        min-width: auto;
        flex: 1;
        padding: 0 4px;
        line-height: 1.3;
    }
    
    .datetime-date {
        font-size: 10px;
        white-space: nowrap;
    }
    
    .datetime-time {
        font-size: 9px;
        white-space: nowrap;
    }
    
    /* 天文アイコンのモバイル調整（日時表示の右側） */
    .astronomy-icon {
        order: 4;
        font-size: 20px;
        margin-left: 2px;
        margin-right: 4px;
        /* モバイルではやや控えめなハロ効果 */
        text-shadow: 
            0 0px 3px rgba(0, 0, 0, 1);
    }
    
    /* タイムラインスライダーの幅とサイズを調整 */
    .timeline-slider {
        width: 100%;
        order: 5;
        height: 5px;
        margin: 0;
    }
    
    .timeline-slider::-webkit-slider-thumb {
        width: 14px;
        height: 14px;
    }
    
    .timeline-slider::-moz-range-thumb {
        width: 14px;
        height: 14px;
    }
    
    /* 縮尺バーを非表示 */
    .maplibregl-ctrl-scale {
        display: none !important;
    }
    
    /* メニューパネルの調整 */
    .menu-panel {
        width: calc(100vw - 40px);
        max-width: 320px;
        max-height: calc(100vh - 220px); /* 200px拡張 */
    }
    
    /* トラッキングカードの調整 */
    .tracking-card {
        max-width: calc(100vw - 40px);
        bottom: 80px;
        height: 140px;
    }
    
    .tracking-nav {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .tracking-nav-prev {
        left: -13px;
    }
    
    .tracking-nav-next {
        right: -13px;
    }
    
    .tracking-header {
        padding-bottom: 6px;
        margin-bottom: 6px;
    }
    
    .tracking-id {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .tracking-name {
        font-size: 14px;
    }
    
    .tracking-score {
        font-size: 15px;
    }
    
    .tracking-info {
        font-size: 11px;
    }
    
    .tracking-value {
        font-size: 11px;
        line-height: 1.4;
    }
}