:root {
    --bg-color: #0c0e12;
    --card-bg: rgba(22, 26, 34, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
    --input-bg: #1f2937;
    --input-border: #374151;
    --modal-overlay: rgba(0, 0, 0, 0.8);
    --success-color: #10b981;
    --error-color: #ef4444;

    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: none !important; /* Firefox用スクロールバー非表示 */
    -ms-overflow-style: none !important; /* IE/Edge用スクロールバー非表示 */
}

/* Chrome, Safari, Opera のスクロールバーを非表示にする */
::-webkit-scrollbar {
    display: none !important;
}

html {
    height: 100%;
    height: -webkit-fill-available;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100%;
    height: -webkit-fill-available;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(45, 212, 191, 0.1) 0px, transparent 50%);
    overscroll-behavior: none; /* スワイプによるブラウザバック等の防止 */
    touch-action: manipulation; /* ピンチズームやダブルタップズームを無効化 */
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

.app-container {
    width: 100%;
    max-width: 800px;
    min-height: 100vh;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .app-container {
        min-height: auto;
        border-radius: 24px;
        background: rgba(22, 26, 34, 0.6);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: var(--shadow-lg);
        margin: 2rem;
    }
}

.app-header {
    margin-bottom: 2.5rem;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.app-title {
    font-size: clamp(1.5rem, 7vw, 2.5rem);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    margin: 0;
    white-space: nowrap;
}

.settings-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -0.25rem;
}

.settings-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(30deg);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tabs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: 1.25rem;
}

.tab-card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    height: 8.0rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    color: var(--text-primary);
}

.tab-card.clickable-tab {
    border: 2px solid #ffffff;
}

.tab-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}


.tab-label {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 1;
}

/* モーダル関連のスタイルは全画面ビュー移行に伴い削除されました */

.station-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    /* 全画面表示に合わせたため max-height を削除 */
    padding-right: 0.25rem;
}

/* スクロールバーカスタマイズ */
.station-list::-webkit-scrollbar {
    width: 4px;
}
.station-list::-webkit-scrollbar-track {
    background: transparent;
}
.station-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.station-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid var(--input-border);
    transition: all 0.2s ease;
}

.station-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

/* 各アイテムのヘッダー（名前 + 削除ボタン） */
.station-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.station-item-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.station-edit-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

.station-item:hover .station-edit-btn {
    opacity: 1;
}

.station-edit-btn:hover {
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.1);
}

/* サブ情報 */
.station-item-area {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.station-item-location {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.station-item-remarks {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.375rem;
    padding-top: 0.375rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* 設置物タグ */
.station-item-facilities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.facility-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
    white-space: nowrap;
}

.facility-tag-none {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    border-color: rgba(148, 163, 184, 0.2);
}

/* 空リスト表示 */
.station-empty {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    padding: 2rem 1rem;
    opacity: 0.7;
}

.btn {
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: var(--input-bg);
}

/* チェックボックスグリッド */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

.checkbox-item:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(31, 41, 55, 0.8);
}

/* ネイティブチェックボックスを非表示 */
.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* カスタムチェックボックス */
.checkbox-custom {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 6px;
    border: 2px solid var(--input-border);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* チェックマーク */
.checkbox-custom::after {
    content: '';
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: -2px;
}

/* チェック時のスタイル */
.checkbox-item input[type="checkbox"]:checked ~ .checkbox-custom {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.checkbox-item input[type="checkbox"]:checked ~ .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

/* チェック時のカード全体 */
.checkbox-item:has(input:checked) {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.08);
}

.checkbox-label-text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* --- View (Page) Transitions --- */
.app-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    height: -webkit-fill-available;
    overflow: hidden;
    max-width: 800px;
}

@media (min-width: 768px) {
    .app-wrapper {
        height: auto;
        min-height: 80vh;
        border-radius: 24px;
        background: rgba(22, 26, 34, 0.6);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: var(--shadow-lg);
        margin: 2rem;
        overflow: hidden;
    }
    
    /* app-containerの元のスタイルを上書き */
    .app-container {
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
        margin: 0;
        min-height: 100%;
    }
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden; /* 横スクロールバーを完全に非表示にする */
    background-color: var(--bg-color);
    display: none;
    flex-direction: column;
    overscroll-behavior-y: none;
}

@media (min-width: 768px) {
    .view {
        background-color: var(--bg-color);
    }
}

.view.active-view {
    display: flex;
}

/* Animations */
.slide-in-right {
    display: flex;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-out-left {
    display: flex;
    animation: slideOutLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-in-left {
    display: flex;
    animation: slideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-out-right {
    display: flex;
    animation: slideOutRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

/* 報告画面の固有スタイル */
.report-view-content {
    padding: 2rem 1.5rem;
    flex: 1;
}

.back-btn-container {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0.5rem 0;
    touch-action: manipulation; /* iOSでのタップ遅延を防止 */
    position: relative;
    z-index: 30; /* stickyヘッダーより上に置いてタッチを確実に受ける */
    -webkit-user-select: none;
    user-select: none;
}

.back-btn:hover {
    color: var(--text-primary);
}

.back-btn:active {
    opacity: 0.6;
}

.report-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

#report-section-card {
    border: 1.5px solid #ffffff; /* 報告の大外の枠（白） */
    padding: 0.8rem 1.2rem; /* 上下の隙間を詰める（デフォルトは1.5rem） */
}

#collect-section-card {
    border: 1.5px solid rgba(74, 222, 128, 0.6); /* 回収の大外の枠（緑） */
}


/* 報告画面の設置物グリッド */
.facility-report-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 0;
    list-style: none;
    margin-top: 0.5rem;
}

.facility-report-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: none; /* アニメーションを廃止しタップレスポンスを劇的に向上 */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

/* 一部回収中のため報告側で編集不可となったカードのスタイル */
.facility-report-card.disabled-card {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.facility-report-card.selected {
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* 回収カード（鮮やかな青スタイル統一） */
#report-facility-list .facility-report-card {
    background: rgba(59, 130, 246, 0.25);
    border: none;
    padding: 0.5rem 0.75rem; /* 上下のパディングを短縮 */
    gap: 0.4rem; /* カード内の要素間隔を短縮 */
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.5); /* 内側に1pxの青い枠線 */
    border-radius: 12px;
}

#report-facility-list .facility-report-card:hover {
    background: rgba(59, 130, 246, 0.35);
}

/* 互換用: collect-status クラスが付与されても同じ青スタイルを維持 */
#report-facility-list .facility-report-card.collect-status {
    background: rgba(59, 130, 246, 0.3);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.6);
}

/* 回収カード選択時（白枠＋明るい青の光彩でくっきり強調） */
#report-facility-list .facility-report-card.selected {
    border: none;
    background: rgba(59, 130, 246, 0.45);
    box-shadow: inset 0 0 0 2px #ffffff, 0 0 10px rgba(59, 130, 246, 0.6); /* 内側に2pxの白枠、外側に青い光彩 */
}

.facility-report-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    pointer-events: none;
}

.facility-report-value {
    width: 100%;
    text-align: center;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 0; /* paddingによる要素の膨らみを防止 */
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    height: 2.125rem; /* 固定高さに変更 */
    line-height: 1; /* フォントによる高さのブレを排除 */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-sizing: border-box;
}

.facility-report-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 100%;
}

.facility-key-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    height: 2.35rem; /* 元の高さ（約37px）に合わせて固定し、満杯による伸縮を防止 */
    display: inline-flex; /* 内部テキストの完全な中央配置 */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.facility-key-btn:active {
    transform: scale(0.95);
}

.facility-key-btn.selected {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* タップフィードバック用 */
.tab-tap-preview {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(0.98);
    border-color: rgba(255, 255, 255, 0.2) !important;
}



/* 報告一覧ビューの設置物グリッド（4列・小さめ） */
#report-list-facilities {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.5rem !important;
    padding: 0 0.5rem !important;
    margin-top: 0 !important;
}

#report-list-facilities .facility-report-card {
    padding: 0.6rem 0.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

/* --- 一部回収フローティングウインドウ --- */
.partial-window {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.partial-window-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.partial-window-facility {
    font-size: 1.2rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 0.25rem;
}

.partial-input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 240px;
}

.partial-input-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 3.5rem;
    text-align: right;
}

.partial-input-field {
    flex: 1;
    text-align: center;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.partial-input-field.selected {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.partial-window-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    width: 100%;
    max-width: 240px;
}

.partial-btn {
    flex: 1;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.partial-btn:active {
    transform: scale(0.96);
}

.partial-btn-confirm {
    background: #3b82f6;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.partial-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 計量計算時の確認ポップアップオーバーレイ */
.confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    z-index: 100;
    animation: fadeInOverlay 0.2s ease-out forwards;
    padding: 1rem;
    box-sizing: border-box;
    border: 1.5px solid rgba(59, 130, 246, 0.5);
}

.confirm-overlay-msg {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    line-height: 1.4;
}

.confirm-overlay-btn-group {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    max-width: 220px;
}

.confirm-overlay-btn {
    flex: 1;
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.confirm-overlay-btn-yes {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.confirm-overlay-btn-yes:active {
    background: #2563eb;
    transform: scale(0.96);
}

.confirm-overlay-btn-no {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.confirm-overlay-btn-no:active {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.96);
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 座標取得アクションボタン */
.location-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;
}

.btn-location-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.6rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transition: all 0.2s ease;
    margin: 0;
    width: auto;
}

.btn-location-action:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-location-action:active {
    transform: scale(0.98);
}

.location-icon {
    flex-shrink: 0;
}

/* 計量データ残存時の蛍のような光ギミック */
@keyframes firefly-glow {
    0%, 100% {
        box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.15);
    }
    50% {
        box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.65);
    }
}

.tab-unmeasured-glow {
    animation: firefly-glow 2.5s ease-in-out infinite;
    position: relative;
}

.tab-unmeasured-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
    pointer-events: none;
    opacity: 0.3;
    animation: firefly-pulse 2.5s ease-in-out infinite;
    z-index: 0;
}

@keyframes firefly-pulse {
    0%, 100% {
        opacity: 0.08;
    }
    50% {
        opacity: 0.3;
    }
}

/* ステーション選択カスタムモーダル */
.modal-overlay-custom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 14, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.modal-content-custom {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    width: 100%;
    max-width: 450px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header-custom h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-body-custom {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.station-select-option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.station-select-option-btn:hover,
.station-select-option-btn:active {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--accent-color);
}

.station-select-option-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.station-select-option-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.station-select-option-distance {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
}

/* ================================ */
/* 地図ビュー（Maplibre）スタイル     */
/* ================================ */
.map-type-control {
    display: flex;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 3px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.map-type-btn {
    background: transparent;
    border: none;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-type-btn.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* 自車位置送信トグルスイッチ */
.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #10b981;
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* ステーション詳細シート */
.station-detail-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px 16px 0 0;
    padding: 1.25rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    animation: sheetSlideUp 0.25s ease-out;
}

@keyframes sheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ステーションピンマーカー */
.station-map-pin {
    width: 32px;
    height: 32px;
    background: #ef4444;
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.station-map-pin:hover, .station-map-pin:active {
    transform: scale(1.15);
    background: #dc2626;
}

.station-map-pin svg {
    color: white;
    width: 18px;
    height: 18px;
}

/* リアルタイム共有の車マーカー (Maplibre版完全準拠) */
.shared-car-marker {
    width: 60px;
    height: 38px;
    cursor: pointer;
    transition: transform 0.3s ease-out;
}
.shared-car-marker.tracked {
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.85));
}
.car-pin-marker {
    width: 60px;
    height: 38px;
    cursor: pointer;
    transition: transform 0.3s ease-out;
}

/* ステーションラベルの表示・非表示（ズームレベル11基準: 広域時は非表示、詳細拡大時に表示） */
.station-marker-label {
    display: none !important;
}
.map-zoom-detailed .station-marker-label {
    display: block !important;
}

/* 仮登録ピンのアニメーション */
@keyframes koshiTempPulse {
    0%, 100% {
        transform: rotate(-45deg) scale(1);
        box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
    }
    50% {
        transform: rotate(-45deg) scale(1.12);
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.85);
    }
}

/* 位置調整確認ポップアップの最前面固定と極スリム化 */
.adjust-popup-top,
.maplibregl-popup.adjust-popup-top {
    z-index: 3000 !important;
}
.adjust-popup-top .maplibregl-popup-content {
    padding: 4px 6px !important;
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}
.adjust-popup-top .maplibregl-popup-tip {
    border-top-color: rgba(15, 23, 42, 0.95) !important;
}

/* 地図画面：設置物フィルタータブバー */
.map-facility-tab-btn {
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.16);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.map-facility-tab-btn:active {
    transform: scale(0.96);
}

.map-facility-tab-btn.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #60a5fa;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.45);
}

/* 地図画面：近接時（50m以内）の自動報告フローティングカード */
.map-nearby-report-card {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    width: calc(100% - 32px);
    max-width: 400px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(16, 185, 129, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    padding: 12px 14px;
    z-index: 5006;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.map-nearby-report-card.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.map-nearby-report-btn {
    width: 100%;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.map-nearby-report-btn:active {
    transform: scale(0.98);
    filter: brightness(0.95);
}

/* 近接カード出現時の自車位置・コンパスボタン スムーズリフトアップ */
#locate-me-btn,
#compass-mode-btn {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border 0.2s ease, color 0.2s ease !important;
}

/* 地図準備中スピナーアニメーション */
@keyframes koshiSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.koshi-spin {
    animation: koshiSpin 0.9s linear infinite;
}



/* 地図検索候補ドロップダウンリスト (koshi ダーク調) */
#map-search-candidates-list {
    margin-top: 8px;
    max-height: 260px;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow-y: auto;
    z-index: 5010;
    display: none;
    -webkit-overflow-scrolling: touch;
}

.map-search-candidate-item {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: background-color 0.15s ease;
}

.map-search-candidate-item:last-child {
    border-bottom: none;
}

.map-search-candidate-item:active,
.map-search-candidate-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.map-search-candidate-info {
    flex: 1;
    min-width: 0;
}

.map-search-candidate-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.map-search-candidate-addr {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-search-candidate-dist {
    font-size: 0.75rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- 画像プレビューグリッド ＆ 長押しドラッグ並び替え (Maplibre版準拠) --- */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    touch-action: none;
    background: rgba(0, 0, 0, 0.2);
}

.preview-item::before {
    content: "";
    display: block;
    padding-top: 100%;
}

.preview-item.dragging {
    opacity: 0.7;
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    z-index: 100;
    animation: wiggle 0.3s infinite;
}

@keyframes wiggle {
    0% { transform: scale(1.1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-2deg); }
    75% { transform: scale(1.1) rotate(2deg); }
    100% { transform: scale(1.1) rotate(0deg); }
}

.preview-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    z-index: 10;
    transition: background 0.15s ease;
}
.preview-item .remove-btn:active {
    background: #ef4444;
}

/* ==========================================================================
   Maplibre版準拠: 統合詳細モーダル（メモ・画像）スタイル
   ========================================================================== */
.custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.custom-popup-overlay.show {
    opacity: 1;
}
.custom-popup-modal {
    background: #ffffff;
    width: 92%;
    max-width: 480px;
    max-height: 90vh;
    max-height: 90dvh;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s ease;
}
.custom-popup-overlay.show .custom-popup-modal {
    transform: scale(1);
}
.custom-popup-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}
.custom-popup-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}
.modal-image-wrapper {
    position: relative;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}
.modal-image-wrapper .list-image-item {
    display: block;
    width: 100%;
    margin-bottom: 0 !important;
    border: none !important;
    transform-origin: center center;
    transition: transform 0.2s ease-out;
    user-select: none;
    -webkit-user-drag: none;
}
.photo-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
    z-index: 10;
}

/* iOSピン長押し・タッチ保護 */
.station-map-pin-wrapper,
.station-pin-icon,
.station-pin-icon * {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* ==========================================================================
   Maplibre版完全準拠: 登録・修正画面（#register-view）ブロックレイアウト
   ========================================================================== */
#register-view {
    background-color: #f1f5f9 !important; /* 落ち着いたライトグレー背景で白カードを際立たせる */
    background-image: none !important;
    color: #1e293b !important;
}

#register-view .register-header-bar {
    padding-top: 1.5rem;
    padding-bottom: 0.85rem;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    z-index: 10;
    flex-shrink: 0;
}

#register-view .modal-title {
    color: #0f172a !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
}

#register-view #close-register-modal-btn {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

#register-view #close-register-modal-btn:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

#register-view #close-register-modal-btn svg {
    stroke: #334155 !important;
}

/* 各セクションの独立カード（Maplibre版ブロック構造） */
#register-view .form-section {
    border-radius: 12px;
    padding: 1.25rem 1rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

/* 左端の濃いアクセント縦線＋ブロック全体の淡いテーマカラー（Maplibre版再現） */
#register-view .form-section.section-corp {
    border-left: 5px solid #2563eb !important; /* 濃いブルー線 */
    background-color: #dbeafe !important; /* 淡いブルー背景（しっかり認識できるパステル） */
    border-top: 1px solid #bfdbfe !important;
    border-right: 1px solid #bfdbfe !important;
    border-bottom: 1px solid #bfdbfe !important;
}

#register-view .form-section.section-corp .form-section-header {
    border-bottom: 1px solid #93c5fd;
    color: #1e40af;
}

#register-view .form-section.section-site {
    border-left: 5px solid #059669 !important; /* 濃いグリーン線 */
    background-color: #d1fae5 !important; /* 淡いミントグリーン背景（しっかり認識できるパステル） */
    border-top: 1px solid #a7f3d0 !important;
    border-right: 1px solid #a7f3d0 !important;
    border-bottom: 1px solid #a7f3d0 !important;
}

#register-view .form-section.section-site .form-section-header {
    border-bottom: 1px solid #6ee7b7;
    color: #065f46;
}

#register-view .form-section.section-disposal {
    border-left: 5px solid #7c3aed !important; /* 濃いパープル線 */
    background-color: #ede9fe !important; /* 淡いラベンダー/パープル背景（しっかり認識できるパステル） */
    border-top: 1px solid #ddd6fe !important;
    border-right: 1px solid #ddd6fe !important;
    border-bottom: 1px solid #ddd6fe !important;
}

#register-view .form-section.section-disposal .form-section-header {
    border-bottom: 1px solid #c4b5fd;
    color: #6b21a8;
}

/* メモ・画像専用カード（Maplibre版完全準拠: 左に濃いアンバー線＋淡いイエロー背景） */
#register-view .form-section.section-notes {
    border-left: 5px solid #d97706 !important; /* 濃いアンバー線 */
    background-color: #fef3c7 !important; /* 淡いイエロー背景（Maplibre版準拠） */
    border-top: 1px solid #fde68a !important;
    border-right: 1px solid #fde68a !important;
    border-bottom: 1px solid #fde68a !important;
}

#register-view .form-section-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.5rem;
}

#register-view .form-section.section-notes .form-section-header {
    border-bottom: 1px solid #fde68a;
    color: #92400e;
}

#register-view .form-group {
    margin-bottom: 1rem;
}

#register-view .form-group label {
    display: block;
    color: #334155 !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.35rem;
}

/* 入力欄（白背景＋くっきりグレー境界線＋濃い黒文字） */
#register-view input[type="text"],
#register-view input[type="tel"],
#register-view textarea {
    width: 100%;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 8px !important;
    padding: 0.75rem 0.85rem !important;
    font-size: 16px !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#register-view input[type="text"]::placeholder,
#register-view input[type="tel"]::placeholder,
#register-view textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

#register-view input[type="text"]:focus,
#register-view input[type="tel"]:focus,
#register-view textarea:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
    outline: none !important;
}

/* メモ欄のテキストエリア（Maplibre版と同じ白背景＋イエロー境界線） */
#register-view .form-section.section-notes #remarks {
    background: #ffffff !important;
    border: 1px solid #fde68a !important;
    color: #1e293b !important;
}

#register-view .form-section.section-notes #remarks:focus {
    border-color: #d97706 !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15) !important;
}

/* 処分場入力行 */
#register-view .disposal-site-input {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 8px !important;
}

#register-view .remove-disposal-btn {
    background: #fee2e2 !important;
    border: 1px solid #fca5a5 !important;
    color: #dc2626 !important;
    border-radius: 6px !important;
}

#register-view #add-disposal-btn {
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #2563eb !important;
    font-weight: 600;
}

/* 回収品目チェックボックス */
#register-view .checkbox-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
}

#register-view .checkbox-item .checkbox-label-text {
    color: #1e293b !important;
    font-weight: 500 !important;
}

#register-view .checkbox-item .checkbox-custom {
    border: 2px solid #94a3b8 !important;
    background: #ffffff !important;
}

#register-view .checkbox-item input[type="checkbox"]:checked ~ .checkbox-custom {
    background: #2563eb !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.3) !important;
}

#register-view .checkbox-item:has(input:checked) {
    background: #eff6ff !important;
    border-color: #2563eb !important;
}

/* 写真・カメラボタン */
#register-view #take-photo-btn {
    background: #ffffff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#register-view #select-image-btn {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px dashed #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#register-view #select-image-btn svg {
    stroke: #334155 !important;
}

/* プレビュー画像 */
#register-view .image-preview-grid {
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

#register-view .preview-item {
    border: 1px solid #cbd5e1 !important;
}

/* 保存・キャンセル・削除ボタン */
#register-view button[type="submit"] {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3) !important;
}

#register-view #delete-station-btn,
#register-view #cancel-register-btn {
    height: 44px !important;
    line-height: 42px !important;
    padding: 0 !important;
    text-align: center !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

#register-view #delete-station-btn {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecdd3 !important;
}

#register-view #cancel-register-btn {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

#register-view #cancel-register-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

/* 処分場ブロック内の品目チェックボックス・ラベル（画面外ワープ防止・通常配置確約） */
.disposal-fac-label {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    user-select: none !important;
    width: 100% !important;
}

.disposal-fac-label:has(input:checked) {
    background: transparent !important;
    border: none !important;
}

.disposal-fac-check {
    position: static !important;
    width: 19px !important;
    height: 19px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    margin: 0 !important;
    cursor: pointer !important;
    accent-color: #7c3aed !important;
    flex-shrink: 0 !important;
}

.disposal-fac-text {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    user-select: none !important;
}

/* 処分場品目カード・単価入力スタイル */
.disposal-fac-card {
    position: relative !important;
    border-radius: 8px !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
}

.disposal-fac-price-wrap {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.disposal-fac-price-input {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0.25rem 0.4rem !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    text-align: right !important;
    background: #ffffff !important;
    border: 1px solid #c4b5fd !important;
    border-radius: 6px !important;
    color: #1e293b !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.disposal-fac-price-input:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 2.5px rgba(124, 58, 237, 0.25) !important;
}




/* ==========================================================================
   日報確認・A4印刷モーダル: スマホ表示時のレスポンシブ制御
   スマホからの印刷は不要のため、スマホ幅（768px以下）では印刷ボタンを非表示にし、
   「閉じる」ボタンを横幅いっぱいに拡大して快適な閲覧モードにする
   ========================================================================== */
@media (max-width: 768px) {
    #trigger-a4-print-btn {
        display: none !important;
    }
    #cancel-sheet-modal-btn {
        width: 100% !important;
        flex: 1 !important;
    }
}

/* ================================ */
/* マーカークラスタリング スタイル (Maplibre版完全準拠) */
/* ================================ */

/* クラスターアイコンの共通スタイル */
.marker-cluster {
    background: transparent !important;
}

.marker-cluster div,
.cluster-icon-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.4), 0 0 0 4px rgba(99, 102, 241, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cluster-icon-inner span {
    position: relative;
    z-index: 1;
}

/* 小クラスター（10件未満） */
.marker-cluster-small .cluster-icon-inner {
    background: linear-gradient(135deg, #818cf8, #6366f1);
    font-size: 13px;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35), 0 0 0 4px rgba(99, 102, 241, 0.12);
}

/* 中クラスター（10〜49件） */
.marker-cluster-medium .cluster-icon-inner {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4), 0 0 0 5px rgba(79, 70, 229, 0.15);
}

/* 大クラスター（50件以上） */
.marker-cluster-large .cluster-icon-inner {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    font-size: 17px;
    box-shadow: 0 5px 18px rgba(67, 56, 202, 0.45), 0 0 0 6px rgba(67, 56, 202, 0.18);
}

/* ホバー時の拡大アニメーション */
.marker-cluster:hover .cluster-icon-inner {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5), 0 0 0 6px rgba(99, 102, 241, 0.2);
}

/* クラスター分割アニメーション */
.marker-cluster-animated .marker-cluster {
    transition: all 0.3s ease-out;
}
