* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff8c00, #ffa500);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.header {
    background: rgba(255, 140, 0, 0.9);
    color: white;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

.container {
    max-width: 100%;
    margin: 0;
    background: white;
    flex: 1;
}

#map {
    height: 70vh;
    width: 100%;
}

.controls {
    padding: 15px;
    background: white;
    border-top: 2px solid #ff8c00;
}

.search-box {
    width: 100%;
    padding: 12px;
    border: 2px solid #ff8c00;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    margin-bottom: 15px;
}

.search-box:focus {
    border-color: #ff6b00;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.3);
}

/* 検索サジェストドロップダウン */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #ff8c00;
    border-top: none;
    border-radius: 0 0 15px 15px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.search-suggestions.visible {
    display: block;
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #fff5ed;
}

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

.suggestion-icon {
    font-size: 20px;
    flex-shrink: 0;
}

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

.suggestion-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-label {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 2px;
}

.suggestion-label.places {
    background: #ffc107;
    color: #333;
}

.suggestion-label.curry-log {
    background: #4caf50;
    color: white;
}

.suggestion-label.custom-point {
    background: #2196f3;
    color: white;
}

.suggestion-info {
    font-size: 12px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 検索結果一覧 */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #ff8c00;
    border-top: none;
    border-radius: 0 0 15px 15px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.search-results.visible {
    display: block;
}

.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #fff5ed;
}

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

.result-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.result-info {
    font-size: 12px;
    color: #666;
}

.search-wrapper {
    position: relative;
}

.log-section {
    padding: 15px;
    background: #fafafa;
}

.log-title {
    font-size: 18px;
    color: #ff6b00;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.log-count {
    background: #ff8c00;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    margin-left: 10px;
}

.log-list {
    max-height: 200px;
    overflow-y: auto;
}

.log-item {
    background: white;
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 8px;
    border-left: 4px solid #ff8c00;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.log-item-name {
    font-weight: bold;
    color: #333;
}

.log-item-date {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 90%;
    width: 350px;
}

.popup h3 {
    color: #ff6b00;
    margin-bottom: 15px;
    font-size: 18px;
}

.popup-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    flex: 1;
    transition: all 0.3s;
}

.btn-primary {
    background: #ff8c00;
    color: white;
}

.btn-primary:hover {
    background: #ff6b00;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.debug-info {
    padding: 10px;
    background: #f0f8ff;
    border: 1px solid #add8e6;
    margin: 10px;
    border-radius: 5px;
    font-size: 12px;
}

/* ティッカー機能スタイル（フェードイン・アウト版） */
.ticker-container {
    background: linear-gradient(90deg, #fff3cd 0%, #fff9e6 100%);
    border-bottom: 2px solid #ffc107;
    margin: 0;
    overflow: hidden;
    min-height: 40px;
    position: relative;
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.ticker-item {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
}

.ticker-emoji {
    font-size: 16px;
}

.ticker-category {
    font-weight: bold;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
    white-space: nowrap;
}

.ticker-category-pr {
    background: #ffc107;
    color: #333;
}

.ticker-category-news {
    background: #6c757d;
    color: white;
}

.ticker-item a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    white-space: nowrap;
}

.ticker-item a:hover {
    color: #ff6b00;
    text-decoration: underline;
}

/* マーカーアニメーション */
@keyframes markerScaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* カスタムマーカースタイル */
.custom-marker {
    cursor: pointer;
    position: relative;
}

/* 訪問済みマーカー（半透明） */
.custom-marker.visited-marker {
    opacity: 0.6;
}

/* カスタム地点マーカー（✅アイコン）の優先表示 */
.custom-point-marker {
    cursor: pointer;
    position: relative;
    z-index: 1000 !important;
}

/* アニメーションラッパー */
.marker-animation-wrapper {
    animation: markerScaleIn 0.3s ease-out forwards;
    transform-origin: center center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* アニメーション完了後も表示を維持 */
.marker-animation-wrapper svg {
    pointer-events: none;
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 20px;
    }

    #map {
        height: 60vh;
    }
}

/* フッタースタイル */
.footer {
    background-color: #2c2c2c;
    color: #ffffff;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
    margin: 8px 0;
    font-size: 14px;
}

.footer-content a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: #ff6b00;
}

/* プライバシーポリシーページ */
.privacy-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    flex: 1;
}

.privacy-container h1 {
    color: #ff6b00;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
}

.privacy-section {
    margin-bottom: 30px;
}

.privacy-section h2 {
    color: #2c2c2c;
    font-size: 22px;
    margin-bottom: 15px;
    border-left: 4px solid #ff6b00;
    padding-left: 15px;
}

.privacy-section p {
    color: #333;
    line-height: 1.8;
    margin-bottom: 15px;
}

.privacy-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.privacy-section li {
    color: #333;
    line-height: 1.8;
    margin-bottom: 8px;
}

.privacy-section a {
    color: #ff6b00;
    text-decoration: none;
}

.privacy-section a:hover {
    color: #ff8c00;
    text-decoration: underline;
}

.privacy-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.btn-back {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ff6b00;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background-color: #ff8c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* プライバシーページのレスポンシブ */
@media (max-width: 768px) {
    .privacy-container {
        padding: 30px 15px;
    }

    .privacy-container h1 {
        font-size: 26px;
    }

    .privacy-section h2 {
        font-size: 20px;
    }
}

/* ===============================
   ハンバーガーメニュー
   =============================== */

/* ハンバーガーボタン */
.hamburger {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    transition: transform 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #ff6b00;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ハンバーガーボタンがアクティブな時（X字型） */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* メニューが開いているときはハンバーガーボタンを非表示 */
.hamburger.active {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* メニューオーバーレイ */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

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

/* スライドメニュー */
.slide-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.slide-menu.active {
    right: 0;
}

/* メニュー閉じるボタン */
.menu-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 36px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.menu-close:hover {
    color: #ff6b00;
}

/* メニューリスト */
.menu-list {
    list-style: none;
    padding: 60px 0 20px;
    margin: 0;
}

.menu-list li {
    border-bottom: 1px solid #f0f0f0;
}

.menu-list a {
    display: block;
    padding: 16px 24px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu-list a:hover {
    background-color: #fff5ed;
    color: #ff6b00;
}

/* body固定（メニュー開いている間スクロール無効） */
body.menu-open {
    overflow: hidden;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .slide-menu {
        width: 85%;
        max-width: 320px;
        right: -100%;
    }

    .hamburger {
        top: 15px;
        right: 15px;
    }
}

@media (min-width: 769px) {
    .hamburger {
        display: flex; /* デスクトップでも表示 */
    }
}

/* ============================================================================
   カスタム地点モーダル
   ============================================================================ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group .required {
    color: #ff6b00;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px; /* iOS zoom prevention */
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b00;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.photo-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.photo-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #eee;
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}

.photo-delete-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.btn-add-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-add-photo:hover {
    background: #fff5ed;
    border-color: #ff6b00;
    color: #ff6b00;
}

.add-photo-icon {
    font-size: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.modal-footer .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.modal-footer .btn-primary {
    background: #ff6b00;
    color: white;
}

.modal-footer .btn-primary:hover {
    background: #e66000;
}

.modal-footer .btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.modal-footer .btn-secondary:hover {
    background: #e5e5e5;
}

/* モバイル対応 */
@media (max-width: 600px) {
    .modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

