/* StarWatch - 天体観測地口コミサイト スタイルシート */

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

/* ===============================
   写真メタデータ入力エリアのスタイル
   =============================== */

/* 写真プレビューコンテナ */
.images-preview-container {
    margin-top: 15px;
    padding: 15px;
    background-color: #2d3748;
    border-radius: 8px;
    border: 1px solid #4a5568;
}

.images-preview-container h4 {
    color: #f7fafc;
    font-size: 1rem;
    margin: 0 0 15px 0;
    font-weight: 600;
}

/* 写真一覧コンテナ */
.images-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 個別写真メタデータアイテム */
.image-metadata-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background-color: #1a202c;
    border-radius: 8px;
    border: 1px solid #4a5568;
}

/* 写真プレビューセクション */
.image-preview-section {
    position: relative;
    flex-shrink: 0;
}

.image-preview-thumbnail {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #4a5568;
}

.image-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background-color: #e53e3e;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.image-remove-btn:hover {
    background-color: #c53030;
}

/* メタデータ入力フィールド */
.image-metadata-inputs {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metadata-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metadata-input-group label {
    color: #cbd5e0;
    font-size: 0.9rem;
    font-weight: 500;
}

.image-title-input,
.image-comment-input {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 6px;
    color: #f7fafc;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.image-title-input {
    padding: 8px 12px;
    height: 40px;
}

.image-comment-input {
    padding: 8px 12px;
    height: 60px;
    resize: vertical;
    min-height: 60px;
    max-height: 120px;
}

.image-title-input:focus,
.image-comment-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.image-title-input::placeholder,
.image-comment-input::placeholder {
    color: #718096;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .image-metadata-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .image-preview-section {
        align-self: center;
    }
    
    .image-preview-thumbnail {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .images-preview-container {
        padding: 12px;
    }
    
    .image-metadata-item {
        padding: 12px;
    }
    
    .image-preview-thumbnail {
        width: 80px;
        height: 80px;
    }
}

/* ===============================
   スクロールバーカスタマイズ
   =============================== */

/* Webkit系ブラウザ（Chrome, Safari, Edge）用 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a202c;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
    border: 1px solid #2d3748;
}

::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

::-webkit-scrollbar-thumb:active {
    background: #a0aec0;
}

::-webkit-scrollbar-corner {
    background: #1a202c;
}

/* Firefox用 */
html {
    scrollbar-width: thin;
    scrollbar-color: #4a5568 #1a202c;
}

/* ===============================
   埋め込みログインボックス用スタイル
   =============================== */

/* ログインボックスコンテナ（水平レイアウト用にコンパクト化） */
.login-box-container {
    background: transparent;
    border-radius: 0;
    padding: 6px 12px; /* アバター表示に必要十分なパディング */
    min-width: 180px; /* アバター表示に最適化 */
    max-width: 240px; /* コンパクトに調整 */
    border: none;
    box-shadow: none;
}

/* 読み込み中表示 */
.login-loading {
    text-align: center;
    color: #cbd5e0;
    font-size: 13px; /* フォントサイズ削減 */
    padding: 8px; /* パディング削減 */
}

.loading-text {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ログインフォームコンテナ */
.login-form-container {
    color: #f7fafc;
}

/* ログインフォームヘッダー */
.login-form-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-form-title {
    color: #f7fafc;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.login-form-subtitle {
    color: #cbd5e0;
    font-size: 12px;
    margin: 0;
}

/* フォーム */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-label {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
}

.form-input {
    background: #1a202c;
    border: 1px solid #4a5568;
    border-radius: 6px;
    padding: 10px 12px;
    color: #f7fafc;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-input::placeholder {
    color: #718096;
}

/* エラーメッセージ */
.error-message {
    background: #fed7d7;
    border: 1px solid #fc8181;
    border-radius: 6px;
    padding: 12px;
    margin: 10px 0;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.error-text {
    color: #c53030;
    font-size: 13px;
    line-height: 1.4;
    flex: 1;
}

.error-close {
    background: none;
    border: none;
    color: #c53030;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.error-close:hover {
    background: rgba(197, 48, 48, 0.1);
}

/* ===============================
   認証ボタン用スタイル（モーダル型）
   =============================== */

/* 認証ボタンコンテナ */
.auth-buttons-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===============================
   ドロップダウン型ログイン後UI
   =============================== */

/* ログイン後のドロップダウンコンテナ */
.login-after-dropdown {
    position: relative;
    background: #2d3748;
    border-radius: 8px;
    border: 1px solid #4a5568;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    min-width: 140px; /* 120px → 140px に復旧 */
    max-width: 180px; /* 160px → 180px に復旧 */
    padding: 6px 10px; /* 4px 8px → 6px 10px に復旧 */
}

/* ドロップダウントリガー */
.user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.user-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar-small {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.user-summary {
    flex: 1;
    min-width: 0;
}

.user-name-short {
    font-size: 11px; /* 10px → 11px に復旧 */
    font-weight: 600;
    color: #f7fafc;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status {
    font-size: 9px;
    color: #cbd5e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    font-size: 10px;
    color: #cbd5e0;
    transition: transform 0.3s ease;
}

.user-trigger.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* ドロップダウンメニュー */
.dropdown-menu {
    position: absolute; /* fixed → absolute（親要素基準配置） */
    top: 100%; /* 親要素の真下に配置 */
    left: 0; /* 親要素の左端に揃える */
    width: auto; /* 親要素に合わせて自動調整 */
    min-width: 240px; /* 最小幅を確保 */
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    margin-top: 2px; /* ログインボックスとの間隔を調整 */
    overflow: hidden;
    z-index: 2100; /* ドロップダウン層：エリア検索ボタンより前面に配置 */
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.dropdown-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #4a5568;
    background: #1a202c;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: 600;
}

.dropdown-user-details {
    flex: 1;
}

.dropdown-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #f7fafc;
    margin-bottom: 2px;
}

.dropdown-user-email {
    font-size: 11px;
    color: #cbd5e0;
    word-break: break-all;
}

.dropdown-provider {
    font-size: 10px;
    color: #a0aec0;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 2px;
    display: inline-block;
}

.dropdown-actions {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    color: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item.logout {
    color: #fc8181;
    border-top: 1px solid #4a5568;
}

.dropdown-item.logout:hover {
    background: rgba(229, 62, 62, 0.1);
}

.dropdown-icon {
    font-size: 12px;
    width: 16px;
    text-align: center;
}


/* 匿名ユーザーのアバター色調整 */
.user-avatar-small.anonymous,
.dropdown-avatar.anonymous {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* Googleユーザーのアバター色調整 */
.user-avatar-small.google,
.dropdown-avatar.google {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
}

/* ===============================
   アイコン＋バッジ方式のログインUI
   =============================== */

/* ユーザーアイコンコンテナ */
.user-icon-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* 円形アバター */
.user-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #4a5568;
}

.user-avatar-circle:hover {
    transform: scale(1.05);
    border-color: #68d391;
}

/* プロバイダー別カラー */
.user-avatar-circle.google {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
}

.user-avatar-circle.anonymous {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* アバター内のイニシャル */
.avatar-initial {
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
}

/* 緑のオンラインバッジ - 固定表示（アニメーション削除） */
.online-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 2px solid #1a202c;
    border-radius: 50%;
}

/* ドロップダウンメニューの位置調整 */
.user-icon-container .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
}

/* ドロップダウン型UIのレスポンシブ対応 */
@media (max-width: 768px) {
    .login-after-dropdown {
        min-width: 120px;
        max-width: 150px; /* 130px → 150px に復旧 */
        padding: 4px 8px; /* タブレット用パディング復旧 */
    }
    
    .dropdown-menu {
        position: absolute; /* fixed → absolute に統一 */
        top: 100%; /* 親要素の真下 */
        left: 0; /* 親要素の左端 */
        min-width: 200px; /* タブレット用最小幅 */
    }
    
    /* アイコン＋バッジ方式のタブレット対応 */
    .user-avatar-circle {
        width: 36px;
        height: 36px;
    }
    
    .avatar-initial {
        font-size: 14px;
    }
    
    .online-badge {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .login-after-dropdown {
        min-width: 100px;
        max-width: 130px; /* 110px → 130px に復旧 */
        padding: 3px 6px; /* スマートフォン用パディング復旧 */
    }
    
    .dropdown-menu {
        position: absolute; /* fixed → absolute に統一 */
        top: 100%; /* 親要素の真下 */
        left: 0; /* 親要素の左端 */
        min-width: 180px; /* モバイル用最小幅 */
    }
    
    /* アイコン＋バッジ方式のモバイル対応 */
    .user-avatar-circle {
        width: 32px;
        height: 32px;
    }
    
    .avatar-initial {
        font-size: 12px;
    }
    
    .online-badge {
        width: 10px;
        height: 10px;
    }
    
    .user-name-short {
        font-size: 11px;
    }
    
    .user-status {
        font-size: 8px;
    }
}

/* ログインボタン */
.login-button {
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
}

/* 新規登録ボタン（リンクスタイル） */
.signup-link {
    background: none;
    color: #cbd5e0;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.signup-link:hover {
    color: #f7fafc;
    background: rgba(113, 128, 150, 0.1);
}

.login-button:hover:not(:disabled) {
    background: #2c5aa0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(49, 130, 206, 0.3);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 古いログイン後UIスタイルは削除済み - ドロップダウン型に統一 */

/* 共通のアバターテキストスタイル */
.avatar-text {
    font-size: 14px;
    font-weight: bold;
    color: white;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .login-box-container {
        min-width: auto;
        max-width: 100%;
        padding: 8px; /* モバイル用に最適化されたパディング */
    }
    
    .form-input {
        padding: 8px 10px;
        font-size: 16px; /* iOS での zoom 防止 */
    }
    
    .login-button {
        padding: 10px;
        font-size: 14px;
    }
    
    .avatar-text {
        font-size: 12px;
    }
}

/* このエリアを検索ボタン */
.area-search-btn {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: 0.3px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    min-width: max-content;
    z-index: 1050 !important; /* フローティング要素層：ドロップダウンより下位 */
    gap: 12px !important;
    padding: 10px 20px !important;
    align-items: center !important;
    justify-content: center !important;
}

.area-search-btn .search-icon {
    flex-shrink: 0 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    display: inline-block !important;
    width: 20px !important;
    text-align: center !important;
    margin-right: 12px !important;
}

.area-search-btn .search-text {
    flex-shrink: 0 !important;
    margin-left: 12px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    padding-left: 8px !important;
}

.area-search-btn span:last-child {
    flex-shrink: 0 !important;
    margin-left: 12px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    padding-left: 8px !important;
}

.area-search-btn:hover {
    background-color: #f8f9fa !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 3px 6px rgba(0, 0, 0, 0.15);
}

.area-search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .area-search-btn {
        left: auto !important;
        right: 1rem !important;
        left: unset !important;
    }
    
    /* タブレット画面での地図コンテナ動的高さ */
    body .main-content .map-container {
        height: 100%; /* フル高さを維持 */
        flex: 2.2; /* フレックス比率を調整して2:1に近づける */
    }
    
    body .main-content .sidebar {
        flex: 1; /* サイドバーの比率を明示 */
    }
}

@media (max-width: 768px) {
    .area-search-btn {
        display: none !important;
    }
}

:root {
    --header-height: 95px; /* アバター表示に最適化されたヘッダー高さ */
}

html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* 観測地詳細のタブナビゲーション */
.location-tab-navigation {
    display: flex;
    border-bottom: 2px solid #4a5568;
    margin-bottom: 15px;
    background-color: #1a202c;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    flex-shrink: 0;
}

.location-tab-button {
    flex: 1;
    padding: 12px 20px;
    background-color: #2d3748;
    color: #a0aec0;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.location-tab-button:hover {
    background-color: #4a5568;
    color: #ffffff;
}

.location-tab-button.active {
    background-color: #3182ce;
    color: #ffffff;
    border-bottom-color: #63b3ed;
    box-shadow: 0 2px 8px rgba(49, 130, 206, 0.3);
}

/* モバイル表示時の口コミタブ絵文字削除 */
@media (max-width: 768px) {
    #location-reviews-tab {
        font-size: 0;
    }
    
    #location-reviews-tab::after {
        content: "口コミ";
        font-size: 1rem;
        font-weight: 600;
    }
}

/* タブコンテンツ - Chrome互換性向上のため詳細度を強化 */
.location-details {
    flex: 1;
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.location-details .location-tab-content {
    display: none !important;
    animation: fadeIn 0.3s ease-in-out;
    padding: 0;
    background: transparent;
    flex: 1;
    overflow-y: auto;
}

.location-details .location-tab-content.active {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
}

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

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: #0a0e27; /* 夜空のような深い青色 */
    color: #ffffff;
    line-height: 1.6;
}

/* ヘッダー部分のスタイル（案1: 水平レイアウト） */
.header {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    min-height: 80px; /* アバター表示に必要な高さに調整 */
    padding: 8px 12px; /* アバター表示に適切なパディング */
    border-bottom: 1px solid #4a5568; /* 2px → 1px に削減 */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); /* シャドウを軽量化 */
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center; /* space-between → center（ログインボックス絶対配置のため） */
    max-width: 1200px;
    margin: 0 auto;
    gap: 16px; /* 20px → 16px に削減 */
    position: relative; /* 区切り線用とログインボックス絶対配置用 */
    padding-left: 120px; /* 未ログイン時の基本左マージン */
    transition: padding-left 0.3s ease; /* パディング変化をスムーズに */
}

/* ログイン後のヘッダーパディング調整（通常フローでは不要） */
.header-content.user-logged-in {
    /* padding-left調整は不要（通常フローのため） */
}

/* ログインボックス（通常フロー配置） */
.login-box-container {
    position: static; /* 絶対配置から通常フローに変更 */
    order: 0; /* 最左端に配置（ログインボックスは左上） */
    flex-shrink: 0; /* 縮小防止 */
    min-width: 120px; /* 最小幅保証 */
    max-width: 160px; /* 最大幅制限 */
    /* 動的サイズ対応 */
    min-width: 80px;  /* 未ログイン時の最小幅 */
    max-width: 200px; /* ログイン後の最大幅（180px → 200px に復旧）*/
    width: auto;      /* 内容に応じて伸縮 */
    flex-shrink: 0;
    margin-right: 0; /* 既存のマージンをリセット */
    /* order: -1; 絶対配置なのでorder不要 */
}

/* 要素間の視覚的区切り */
.login-box-container::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    display: none; /* デフォルトは非表示 */
}

/* 中央: タイトルセクション（コンパクト化） */
.header-main {
    order: 1; /* ログインボックスの次に配置 */
    flex: 1; /* 伸縮可能 */
    flex-shrink: 1; /* 必要に応じて縮小可能 */
    text-align: center;
    min-width: 0; /* 最小幅をと0に設定 */
}

/* 新構造：タイトルコンテナ */
.header-title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1; /* 1.0 → 1.1 に復旧 */
    margin: 0;
    padding: 3px 0; /* 上下の余白をわずかに拡張 */
    gap: 3px; /* タイトルとサブタイトル間により適切なスペース */
}

.header-title-main {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    padding: 0;
    line-height: 1.1; /* 0.9 → 1.1 に復旧（重なり解消） */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #ffffff;
}

.header-title-sub {
    font-size: 16px;
    font-weight: 400;
    color: #cbd5e0;
    margin: 0;
    padding: 0;
    line-height: 1.1; /* メインタイトルと統一 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-top: 0px; /* -2px → 0px に変更（重なり解消） */
}

/* 従来のタイトルスタイル（互換性のため残す） */
.header-title {
    font-size: 20px; /* 従来の2remから削減 */
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header-subtitle {
    font-size: 0.9rem;
    color: #a0aec0;
    font-weight: 300;
}

/* 将来の復活用にコメントアウト
.astronomy-location {
    font-size: 11px; 
    color: #68d391;
    font-weight: 500;
    margin: 0;
    background: rgba(104, 211, 145, 0.1);
    padding: 1px 6px;
    border-radius: 8px;
    display: inline-block;
    border: 1px solid rgba(104, 211, 145, 0.3);
    line-height: 1.0;
}
*/

/* 右側: 天文情報（水平配置） */
.astronomy-info {
    flex-shrink: 0;
    display: flex;
    gap: 8px; /* 15px → 8px に削減 */
    align-items: center;
    margin: 0; /* マージン削除 */
    padding: 0; /* パディング削除 */
    order: 2; /* タイトルの次に配置 */
}

.astronomy-compact {
    display: flex;
    flex-direction: column; /* 縦並び配置に変更 */
    gap: 2px; /* 縦並び用に調整 */
    margin: 0;
    padding: 0;
    width: 100px; /* フィードバックボタン統合により20px拡張 */
    min-width: 100px;
}

.astronomy-item {
    display: flex;
    align-items: center;
    gap: 2px; /* 縦並び用にさらに削減 */
    white-space: nowrap;
    padding: 1px 2px; /* 縦並び用コンパクト化 */
    background: transparent;
    border-radius: 3px;
    margin: 0;
    font-size: 11px; /* フォントサイズ調整 */
    height: 16px; /* 各行の高さ統一 */
    justify-content: flex-start; /* 左揃え */
}

.astronomy-icon {
    font-size: 12px; /* 縦並び用さらにコンパクト */
    line-height: 1.0;
    min-width: 14px; /* アイコン幅統一 */
}

.astronomy-text {
    font-size: 9px; /* 縦並び用さらにコンパクト */
    color: #cbd5e0;
    font-weight: 500;
    font-family: monospace;
    line-height: 1.0;
    overflow: hidden;
    text-overflow: ellipsis; /* 長いテキストの省略 */
    margin: 0; /* マージン削除 */
    padding: 0; /* パディング削除 */
}

.moon-phase-name {
    font-size: 9px; /* 10px → 9px に削減 */
    color: #a0aec0;
    margin: 0; /* マージン削除 */
    line-height: 1.0; /* 行間削減 */
}

.moon-age {
    font-size: 10px; /* 11px → 10px に削減 */
    color: #f7fafc;
}

/* 天文情報エリア内のフィードバックボタン */
.astronomy-item .feedback-btn-compact {
    width: 20px;
    height: 20px;
    padding: 2px;
    margin-left: 6px;
    font-size: 10px;
    min-width: auto;
    flex-shrink: 0;
}

.astronomy-item .feedback-btn-compact .feedback-icon {
    font-size: 10px;
    font-weight: 500;
    font-family: monospace;
    margin: 0; /* マージン削除 */
    line-height: 1.0; /* 行間削減 */
}

/* 月齢アイコンにグロー効果 */
#moon-phase-icon {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    animation: moonGlow 3s ease-in-out infinite alternate;
}

@keyframes moonGlow {
    0% { filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3)); }
    100% { filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6)); }
}

/* 従来のスタイル（互換性のため残す） */
.time-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    min-width: 0;
}

.time-icon {
    font-size: 1.2rem;
    line-height: 1;
}

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

.time-label {
    font-size: 0.7rem;
    color: #a0aec0;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
}

.time-value {
    font-size: 0.8rem;
    color: #f7fafc;
    font-weight: 600;
    font-family: monospace;
    white-space: nowrap;
}

/* メインコンテンツのレイアウト */
.main-content {
    display: flex;
    height: calc(100vh - var(--header-height)); /* CSS変数を使用 */
    gap: 10px;
    padding: 10px;
    box-sizing: border-box;
}

/* 地図コンテナ */
.map-container {
    flex: 2;
    position: relative;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 地図本体 */
.map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 地図上のコントロールボタン */
.map-controls {
    position: absolute;
    top: auto;
    bottom: 20px;
    right: 10px;
    z-index: 1000;
}


/* 重複定義を削除 - 正しい定義は836行目にあります */

#map {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* サイドバー */
.sidebar {
    flex: 1;
    height: 100%;
    background-color: #1a202c;
    border-radius: 8px;
    padding: 20px;
    overflow: hidden; /* スクロールバーを非表示 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #2d3748;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* ボタンの基本スタイル */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

/* 主要ボタン（青系） */
.btn-primary {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2c5aa0 0%, #2a4d7c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

/* 副次ボタン（グレー系） */
.btn-secondary {
    background-color: #4a5568;
    color: white;
}

.btn-secondary:hover {
    background-color: #2d3748;
    transform: translateY(-1px);
}

/* 危険ボタン（赤系） */
.btn-danger {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2626 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

/* 無効化ボタン */
.btn.disabled,
.btn:disabled {
    background: #718096 !important;
    color: #a0aec0 !important;
    cursor: default !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.6;
}

.btn.disabled:hover,
.btn:disabled:hover {
    background: #718096 !important;
    color: #a0aec0 !important;
    cursor: default !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 観測地いいねボタン */
.btn-like {
    background: #2d3748;
    color: #cbd5e0;
    border: 1px solid #4a5568;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-like:hover {
    background: #4a5568;
    color: #f7fafc;
    border-color: #e53e3e;
    transform: translateY(-1px);
}

.btn-like.liked {
    background: #e53e3e;
    color: #fff;
    border-color: #c53030;
}

.btn-like.liked:hover {
    background: #c53030;
    border-color: #9c2626;
}

.btn-like .like-icon {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.btn-like.liked .like-icon {
    content: '❤️';
    transform: scale(1.1);
}

.btn-like .like-count {
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

/* リンクボタン */
.btn-link {
    background: none;
    border: none;
    color: #4299e1;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
    margin: 0;
    font-family: inherit;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: #3182ce;
    text-decoration: none;
}

/* フォーム内リンク */
.form-link {
    margin-top: 8px;
    text-align: center;
    font-size: 0.8rem;
    color: #718096;
    line-height: 1.4;
}

.form-link span {
    margin-right: 4px;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ===============================
   お気に入りモーダルスタイル
   =============================== */

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

.favorite-modal-content {
    background: #1a202c;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.favorite-modal-header {
    background: #2d3748;
    padding: 20px;
    border-bottom: 1px solid #4a5568;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.favorite-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #f7fafc;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-count {
    font-size: 16px;
    font-weight: 400;
    color: #cbd5e0;
}

.favorite-modal-close {
    background: none;
    border: none;
    color: #cbd5e0;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.favorite-modal-close:hover {
    background: #4a5568;
    color: #f7fafc;
}

.favorite-tabs {
    background: #2d3748;
    padding: 0 20px;
    display: flex;
    gap: 0;
    border-bottom: 1px solid #4a5568;
}

.favorite-tab {
    background: none;
    border: none;
    color: #cbd5e0;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.favorite-tab:hover {
    color: #f7fafc;
    background: #4a5568;
}

.favorite-tab.active {
    color: #3182ce;
    border-bottom-color: #3182ce;
    background: #1a202c;
}

.favorite-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 0;
}

.favorite-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #cbd5e0;
}

.favorite-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #4a5568;
    border-top: 4px solid #3182ce;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.favorite-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #e53e3e;
    text-align: center;
}

.favorite-error .error-message {
    font-size: 16px;
    margin-bottom: 16px;
}

.favorite-error .retry-button {
    background: #3182ce;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.favorite-error .retry-button:hover {
    background: #2c5aa0;
}

.favorite-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #cbd5e0;
    text-align: center;
}

.favorite-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.favorite-empty h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #f7fafc;
}

.favorite-empty p {
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.favorite-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.favorite-item {
    background: #2d3748;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #4a5568;
    transition: all 0.2s ease;
}

.favorite-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-color: #3182ce;
}

.favorite-item-content {
    margin-bottom: 16px;
}

.favorite-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.favorite-item-type {
    background: #3182ce;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.favorite-review .favorite-item-type {
    background: #38a169;
}

.favorite-image .favorite-item-type {
    background: #d69e2e;
}

.favorite-location .favorite-item-type {
    background: #9f7aea;
}

.favorite-item-date {
    font-size: 12px;
    color: #a0aec0;
}

.favorite-item-title {
    font-size: 18px;
    font-weight: 600;
    color: #f7fafc;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.favorite-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.favorite-item-meta .author {
    font-size: 14px;
    color: #cbd5e0;
}

.favorite-item-meta .rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.favorite-item-meta .star {
    font-size: 14px;
}

.favorite-item-meta .rating-text {
    font-size: 12px;
    color: #a0aec0;
    margin-left: 4px;
}

.favorite-item-meta .review-count {
    font-size: 12px;
    color: #a0aec0;
}

.favorite-item-description {
    font-size: 14px;
    color: #cbd5e0;
    line-height: 1.5;
    margin: 0;
}

.favorite-image-preview {
    margin-top: 12px;
    border-radius: 6px;
    overflow: hidden;
    max-width: 200px;
}

.favorite-image-preview img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    display: block;
}

.favorite-item-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.favorite-item-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.jump-button {
    background: #3182ce;
    color: white;
}

.jump-button:hover {
    background: #2c5aa0;
    transform: translateY(-1px);
}

.remove-button {
    background: #e53e3e;
    color: white;
}

.remove-button:hover {
    background: #c53030;
    transform: translateY(-1px);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .favorite-modal-overlay {
        padding: 10px;
    }
    
    .favorite-modal-content {
        max-height: 95vh;
    }
    
    .favorite-modal-header {
        padding: 16px;
    }
    
    .favorite-modal-title {
        font-size: 20px;
    }
    
    .favorite-tabs {
        padding: 0 16px;
        flex-wrap: wrap;
    }
    
    .favorite-tab {
        font-size: 12px;
        padding: 10px 12px;
    }
    
    .favorite-modal-body {
        padding: 16px;
    }
    
    .favorite-item {
        padding: 16px;
    }
    
    .favorite-item-actions {
        flex-direction: column;
    }
    
    .favorite-item-actions button {
        width: 100%;
    }
}

/* 観測地アクションボタンエリア */
.location-actions {
    position: sticky;
    bottom: 0;
    background-color: #1a202c;
    padding: 15px;
    margin: 20px -20px -20px -20px;
    border-top: 1px solid #2d3748;
    border-radius: 0 0 8px 8px;
    z-index: 100;
}

.location-actions .btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
}

/* 観測地詳細情報 */
.location-details-info {
    margin: 15px 0;
    padding: 10px;
    background-color: #2d3748;
    border-radius: 6px;
    border-left: 4px solid #3182ce;
}

.info-item {
    margin-bottom: 8px;
    color: #f7fafc;
}

.info-label {
    font-weight: 600;
    color: #a0aec0;
}

.facility-info {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.facility-tag {
    background-color: #3182ce;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 評価表示 */
.rating-display {
    margin: 15px 0;
    padding: 15px;
    background-color: #2d3748;
    border-radius: 6px;
    border-left: 4px solid #ffd700;
    overflow: visible; /* 子要素表示制限を解除 */
    max-width: 100%;
}

.overall-rating {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #4a5568;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    gap: 8px;
    flex-wrap: wrap;
}

.detailed-ratings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 5px 0;
    align-items: center;
}

.rating-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    overflow: visible;
    min-height: 28px;
}

.rating-label {
    color: #a0aec0;
    font-size: 0.85rem;
    font-weight: 500;
    flex: 1;
    text-align: left;
}

.rating-stars {
    color: #ffd700;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    flex: 1;
    min-width: 0;
}

/* 詳細評価の数字表示 */
.detailed-ratings .rating-stars {
    color: #68d391;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Helvetica Neue', Arial, monospace;
    background-color: rgba(104, 211, 145, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid rgba(104, 211, 145, 0.3);
    min-width: 60px; /* 幅を拡大: 45px → 60px */
    width: auto; /* 固定幅を解除 */
    max-width: 80px; /* 最大幅制限を追加 */
    text-align: center;
    letter-spacing: 0.2px;
    overflow: visible;
    text-overflow: clip;
    flex: 0 0 auto; /* 自動サイズ調整に変更 */
    white-space: nowrap;
    display: inline-block;
}


.overall-rating .rating-stars {
    font-size: 1.1rem;
    margin-right: 0;
    flex: 0 1 auto;
}

.rating-text {
    color: #a0aec0;
    font-size: 0.9rem;
}

/* ウェルカムメッセージ */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
}

.welcome-message h2 {
    color: #f7fafc;
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.welcome-message p {
    color: #a0aec0;
    line-height: 1.7;
}

/* 観測地詳細表示エリア */
.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2d3748;
    flex-shrink: 0;
}

.details-header h2 {
    color: #f7fafc;
    font-size: 1.4rem;
    flex: 1;
}

.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    order: 3; /* フィードバックボタンを天文情報の次に配置 */
    flex-shrink: 0; /* 縮小防止 */
    min-width: 32px; /* 最小幅保証 */
}

.btn-small {
    padding: 6px 10px;
    font-size: 12px;
    min-width: auto;
}

.location-info {
    flex-shrink: 0;
    margin-bottom: 15px;
}

.location-info p {
    color: #cbd5e0;
    margin-bottom: 10px;
}

/* 観測地概要コメントの改行対応 */
#location-description {
    white-space: pre-line;
    line-height: 1.5;
    word-wrap: break-word;
}

/* 評価表示 */
.rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.rating-stars {
    font-size: 1.2rem;
    color: #ffd700;
}

.rating-text {
    color: #a0aec0;
    font-size: 0.9rem;
}

/* 口コミセクション */
.reviews-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
}

/* 口コミヘッダー */
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.reviews-section h3 {
    color: #f7fafc;
    font-size: 1.2rem;
    margin: 0;
}

/* 並び替えセレクトボックス */
.reviews-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reviews-sort label {
    color: #a0aec0;
    font-size: 0.9rem;
    font-weight: 500;
}

.sort-select {
    background-color: #2d3748;
    color: #f7fafc;
    border: 1px solid #4a5568;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-select:hover {
    border-color: #3182ce;
    background-color: #374151;
}

.sort-select:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.2);
}

.reviews-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border: 1px solid #2d3748;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 個別の口コミアイテム */
.review-item {
    background-color: #2d3748;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 0;
    border-left: 4px solid #3182ce;
    flex-shrink: 0;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-author {
    font-weight: 600;
    color: #f7fafc;
}

.review-rating {
    color: #ffd700;
    font-size: 0.9rem;
}

.review-comment {
    color: #cbd5e0;
    line-height: 1.5;
    margin-bottom: 10px;
}

.review-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 10px;
}

/* 口コミフッター */
.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #4a5568;
}

.review-date {
    color: #718096;
    font-size: 0.8rem;
}

.review-like-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* いいねボタン */
.btn-like {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-like:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-like.liked {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
    box-shadow: 0 0 8px rgba(49, 130, 206, 0.4);
}

.btn-like.liked:hover {
    background: linear-gradient(135deg, #2c5aa0 0%, #2a4d7c 100%);
}

.like-count {
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

/* 口コミの詳細評価表示 */
.review-detailed-ratings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
    padding: 8px;
    background-color: rgba(45, 55, 72, 0.3);
    border-radius: 4px;
    border-left: 3px solid #3182ce;
}

.review-detailed-ratings .rating-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
}

.review-detailed-ratings .rating-label {
    color: #a0aec0;
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 50px;
}

/* 口コミ編集ボタン */
.btn-edit-review {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    margin-right: 4px;
}

.btn-edit-review:hover {
    background: linear-gradient(135deg, #2c5aa0 0%, #2a4d7c 100%);
    transform: scale(1.1);
}

/* 口コミ削除ボタン */
.btn-delete-review {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-delete-review:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2626 100%);
    transform: scale(1.1);
}

/* フォームコンテナ */
.form-container {
    background-color: #2d3748;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #4a5568;
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4a5568;
}

.form-header h2 {
    color: #f7fafc;
    font-size: 1.3rem;
}

/* フォーム要素 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #f7fafc;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #4a5568;
    border-radius: 4px;
    background-color: #1a202c;
    color: #f7fafc;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

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

/* チェックボックスグループ */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #f7fafc;
    font-weight: normal;
}

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

.checkmark {
    font-size: 14px;
}

/* 評価カテゴリ */
.rating-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-category {
    border: 1px solid #4a5568;
    border-radius: 6px;
    padding: 12px;
    background-color: rgba(45, 55, 72, 0.5);
}

.rating-category > label {
    display: block;
    font-weight: 600;
    color: #f7fafc;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* 任意項目のスタイル */
.rating-category.optional {
    border-color: #2d3748;
    background-color: rgba(45, 55, 72, 0.3);
}

.rating-category.optional > label {
    color: #a0aec0;
}

.optional-label {
    font-size: 0.75rem;
    font-weight: 400;
    color: #718096;
    font-style: italic;
}

.rating-input {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input label {
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 6px;
    background-color: #2d3748;
    color: #a0aec0;
    border: 2px solid #4a5568;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
    line-height: 1.2;
    min-width: 38px;
    text-align: center;
    flex: 1;
    position: relative;
    font-weight: 600;
}

.rating-input label:hover {
    background-color: #4a5568;
    color: #ffd700;
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.rating-input input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #2d3748;
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
    font-weight: 700;
}

/* 各評価レベルの色分け */
.rating-input input[value="5"]:checked + label {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.rating-input input[value="4"]:checked + label {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.rating-input input[value="3"]:checked + label {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.rating-input input[value="2"]:checked + label {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    border-color: #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

.rating-input input[value="1"]:checked + label {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

/* 座標表示 */
.coordinates-display {
    background-color: #1a202c;
    padding: 10px;
    border-radius: 4px;
    border: 2px solid #4a5568;
    color: #a0aec0;
    font-family: monospace;
}


/* ファイル入力 */
.form-group input[type="file"] {
    padding: 8px;
    border-style: dashed;
}

.file-info {
    display: block;
    margin-top: 5px;
    color: #718096;
    font-size: 0.8rem;
}

/* 画像表示関連 */
.current-images {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-preview {
    position: relative;
    display: inline-block;
}

.image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #4a5568;
}

.image-remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-remove-btn:hover {
    background: #c53030;
}

.review-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.review-images img {
    max-width: 150px;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.review-images img:hover {
    transform: scale(1.05);
}

/* 画像いいね機能 */
.image-like-container {
    position: relative;
    display: inline-block;
}

.image-like-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1;
}

.image-like-container:hover .image-like-overlay {
    opacity: 1;
}

.image-like-container:hover .image-like-button {
    pointer-events: auto;
}

.image-like-button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 20px;
    padding: 8px 12px;
    color: #e53e3e;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.image-like-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    color: #c53030;
}

.image-like-button.liked {
    background: #e53e3e;
    color: white;
}

.image-like-button.liked:hover {
    background: #c53030;
    color: white;
}

.image-like-count {
    font-size: 12px;
    min-width: 16px;
    text-align: center;
}

/* 写真編集フォーム専用スタイル */
.current-photo {
    margin: 15px 0;
}

.current-photo label {
    display: block;
    margin-bottom: 8px;
    color: #f7fafc;
    font-weight: 500;
}

#edit-photo-preview {
    border: 2px solid #4a5568;
    border-radius: 8px;
    padding: 15px;
    background-color: #1a202c;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#edit-photo-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #4a5568;
}

.form-actions .btn {
    flex: 1;
    min-height: 44px;
}

.btn-danger {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2626 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 48, 48, 0.3);
}

/* 写真タブ機能 */
.photos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #4a5568;
}

.photos-header h3 {
    color: #f7fafc;
    font-size: 1.2rem;
    margin: 0;
}

.photos-sort .sort-info {
    color: #a0aec0;
    font-size: 0.9rem;
    background: rgba(160, 174, 192, 0.1);
    padding: 5px 10px;
    border-radius: 12px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

.photo-grid-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #2d3748;
}

.photo-grid-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

/* 写真読み込み中の表示 */
.photo-item.loading {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #2d3748;
    border: 2px dashed #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.photo-loading {
    color: #a0aec0;
    font-size: 0.9rem;
    text-align: center;
    padding: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.photo-grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 10px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-grid-item:hover .photo-grid-overlay {
    opacity: 1;
}

.photo-like-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 写真いいねボタン */
.photo-like-btn {
    background: none;
    border: none;
    color: #cbd5e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.photo-like-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f7fafc;
}

.photo-like-btn.liked {
    color: #e53e3e;
}

.photo-like-btn.liked:hover {
    color: #c53030;
}

.photo-like-icon {
    font-size: 14px;
}

.photo-like-count {
    font-size: 11px;
    font-weight: 500;
}

/* 写真いいね表示専用（クリック不可） */
.photo-like-display {
    color: #cbd5e0;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* 写真情報表示 */
.photo-info {
    flex: 1;
    min-width: 0;
}

.photo-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.75rem;
    color: #e2e8f0;
}

.photo-author {
    font-weight: 500;
}

.photo-source {
    opacity: 0.8;
    font-size: 0.7rem;
}

/* 写真編集ボタン */
.photo-edit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(66, 153, 225, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.photo-edit-btn:hover {
    background: rgba(66, 153, 225, 1);
    transform: scale(1.1);
}

/* 写真追加ボタンのスタイル */
.photos-add-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.empty-state-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* 写真なし状態 */
.photos-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
}

.empty-state-content {
    max-width: 300px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.photos-empty-state h4 {
    color: #f7fafc;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.photos-empty-state p {
    margin-bottom: 25px;
    line-height: 1.6;
}

/* 概要タブ - 人気写真セクション */
.overview-popular-photos {
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid #4a5568;
}

.popular-photos-title {
    color: #f7fafc;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3182ce;
    display: inline-block;
}

.overview-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    padding: 10px 0;
    max-width: 100%;
}

.overview-photo-item {
    position: relative;
    aspect-ratio: 1;
    cursor: default; /* クリック無効なのでpointerではなくdefault */
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #2d3748;
}

.overview-photo-item:hover {
    transform: scale(1.02); /* 軽微なホバー効果 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

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

.overview-photos-empty {
    text-align: center;
    padding: 40px 20px;
    color: #a0aec0;
    font-style: italic;
    background: rgba(45, 55, 72, 0.3);
    border-radius: 8px;
    border: 2px dashed #4a5568;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .overview-photos-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .popular-photos-title {
        font-size: 1rem;
    }
    
    .overview-popular-photos {
        margin: 15px 0;
        padding: 15px 0;
    }
}

/* 写真モーダル */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.photo-modal-content {
    position: relative;
    max-width: 95vw; /* はみ出し防止: 96vw → 95vw */
    max-height: 95vh; /* はみ出し防止: 96vh → 95vh */
    width: auto;
    height: auto;
    background: #1a202c;
    border-radius: 8px; /* 内部領域拡大: 12px → 8px */
    overflow: hidden; /* はみ出し防止: visible → hidden に戻す */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column; /* フレックス構造で動的調整 */
}

.photo-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: background 0.2s ease;
}

.photo-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.photo-modal-image-container {
    position: relative;
    flex: 1; /* 残り空間を全て使用 */
    min-height: 0; /* フレックス子要素の最小高さ制限を解除 */
    overflow: hidden; /* 確実なはみ出し防止 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000; /* 画像背景を黒に統一 */
    padding: 2px; /* 最小限のパディング */
    max-width: 92vw; /* ビューポート基準の絶対制限 */
    max-height: 69vh; /* 余白拡大分を考慮: 72vh → 69vh */
    width: 100%;
    height: 100%;
}

.photo-modal-image {
    max-width: 90vw; /* ビューポート基準の絶対制限（モーダル95vw - 余裕5vw） */
    max-height: 67vh; /* 余白拡大分を考慮: 70vh → 67vh */
    width: auto; /* 自然サイズを尊重 */
    height: auto; /* 自然サイズを尊重 */
    object-fit: contain; /* 縦横比維持、全体表示保証 */
    display: block;
}

/* 画像縦横比別最適化（一時的に無効化） */
.photo-modal-image.landscape-image {
    /* 安全な基本設定を維持 */
    object-fit: contain;
}

.photo-modal-image.portrait-image {
    /* 安全な基本設定を維持 */
    object-fit: contain;
}

.photo-modal-image.square-image {
    /* 安全な基本設定を維持 */
    object-fit: contain;
}

.photo-modal-image.aspect-mismatch {
    /* 安全な基本設定を維持 */
    object-fit: contain;
}

.photo-modal-info {
    height: 90px; /* 余白改善のためさらに拡大: 80px → 90px */
    padding: 12px 16px; /* 余白拡大: 8px 12px → 12px 16px */
    background: #2d3748;
    border-top: 1px solid #4a5568;
    flex-shrink: 0; /* 縮小禁止 */
    overflow: hidden; /* 内容超過時の対応 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 上詰めでレイアウト安定化 */
}

.photo-modal-title {
    color: #f7fafc;
    font-size: 0.9rem; /* さらに縮小: 0.95rem → 0.9rem */
    font-weight: 600;
    margin: 0 0 6px 0; /* 下マージン拡大: 2px → 6px */
    line-height: 1.3; /* 行間改善: 1.1 → 1.3 */
}

.photo-modal-description {
    color: #cbd5e0;
    font-size: 0.8rem; /* 可読性向上: 0.75rem → 0.8rem */
    line-height: 1.4; /* 行間改善: 1.3 → 1.4 */
    margin: 4px 0 0 0; /* 上マージン追加: 0 → 4px */
    white-space: pre-line; /* 改行を保持 */
    overflow: hidden; /* 溢れ防止 */
    text-overflow: ellipsis; /* 省略記号表示 */
    flex: 1; /* 残りスペースを使用 */
    max-height: 50px; /* 高さ制限拡大: 45px → 50px */
}

.photo-modal-actions {
    height: 60px; /* 高さ拡大: 50px → 60px */
    padding: 12px 16px; /* 余白拡大: 8px 12px → 12px 16px */
    background: #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px; /* ボタン間隔拡大: 8px → 16px */
    flex-shrink: 0; /* 縮小禁止 */
}

.photo-modal-like-button {
    background: rgba(229, 62, 62, 0.1);
    border: 2px solid #e53e3e;
    color: #e53e3e;
    border-radius: 25px;
    padding: 12px 24px; /* 内部余白拡大: 10px 20px → 12px 24px */
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.photo-modal-like-button:hover {
    background: #e53e3e;
    color: white;
    transform: scale(1.05);
}

.photo-modal-like-button.liked {
    background: #e53e3e;
    color: white;
}

.photo-modal-review-link {
    background: rgba(66, 153, 225, 0.1);
    border: 2px solid #4299e1;
    color: #4299e1;
    border-radius: 25px;
    padding: 12px 24px; /* 内部余白拡大: 10px 20px → 12px 24px */
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.photo-modal-review-link:hover {
    background: #4299e1;
    color: white;
    transform: scale(1.05);
}

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

/* 横長画面対応（アスペクト比 > 1.5:1） */
@media (min-aspect-ratio: 3/2) {
    .photo-modal-image {
        max-height: 65vh; /* さらに制限 */
    }
    
    .photo-modal-image-container {
        max-height: 67vh; /* さらに制限 */
    }
    
    .photo-modal-info {
        height: 60px; /* 適度な縮小: 90px → 60px */
        padding: 8px 12px; /* 適度な縮小 */
    }
    
    .photo-modal-title {
        font-size: 0.85rem; /* さらに縮小 */
        margin: 0 0 2px 0;
        line-height: 1.1;
    }
    
    .photo-modal-description {
        font-size: 0.75rem; /* さらに縮小 */
        line-height: 1.2;
    }
    
    .photo-modal-actions {
        height: 45px; /* 適度な縮小: 60px → 45px */
        padding: 8px 12px; /* 適度な縮小 */
        gap: 12px; /* 適度な縮小: 16px → 12px */
    }
    
    .photo-modal-like-button,
    .photo-modal-review-link {
        padding: 6px 12px; /* ボタンパディング縮小 */
        font-size: 0.85rem;
    }
}

/* 極端な横長画面対応（アスペクト比 > 2:1） */
@media (min-aspect-ratio: 2/1) {
    .photo-modal-image {
        max-height: 55vh; /* 極端制限 */
    }
    
    .photo-modal-image-container {
        max-height: 57vh; /* 極端制限 */
    }
    
    .photo-modal-info {
        height: 45px; /* 最小限の縮小: 60px → 45px */
        padding: 6px 10px; /* 最小限の縮小 */
    }
    
    .photo-modal-actions {
        height: 35px; /* 最小限の縮小: 45px → 35px */
        padding: 6px 10px; /* 最小限の縮小 */
        gap: 10px; /* 最小限の縮小: 12px → 10px */
        position: static; /* 絶対配置を解除、重なり防止 */
        background: #2d3748; /* 通常背景に戻す */
    }
    
    .photo-modal-like-button,
    .photo-modal-review-link {
        padding: 4px 8px; /* 極小パディング */
        font-size: 0.8rem;
    }
}

/* タブレット専用設定（769px-1024px） */
@media (min-width: 769px) and (max-width: 1024px) {
    .photo-modal-content {
        max-width: 92vw; /* はみ出し防止: 94vw → 92vw */
        max-height: 92vh; /* はみ出し防止: 94vh → 92vh */
    }
}

/* モバイル設定（768px以下） */
@media (max-width: 768px) {
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .photo-modal-content {
        max-width: 92vw; /* はみ出し防止: 94vw → 92vw */
        max-height: 90vh; /* はみ出し防止: 92vh → 90vh */
    }
    
    .photo-modal-info {
        padding: 10px 14px; /* モバイル更なるコンパクト化: 12px 16px → 10px 14px */
    }
    
    .photo-modal-title {
        font-size: 0.95rem; /* モバイル更なるコンパクト化: 1rem → 0.95rem */
        margin: 0 0 4px 0; /* マージン縮小: 6px → 4px */
    }
    
    .photo-modal-description {
        font-size: 0.8rem; /* モバイル更なるコンパクト化: 0.85rem → 0.8rem */
    }
    
    .photo-modal-actions {
        flex-direction: column;
        gap: 8px; /* ギャップ縮小: 10px → 8px */
        padding: 12px; /* モバイル用パディング縮小: 15px → 12px */
        min-height: 50px; /* モバイル用最小高さ縮小: 60px → 50px */
    }
    
    .photo-modal-like-button,
    .photo-modal-review-link {
        width: 100%;
        justify-content: center;
    }
    
    /* モバイル画像最適化（一時的に無効化） */
    .photo-modal-image.landscape-image {
        /* 安全な基本設定を維持 */
        object-fit: contain;
    }
    
    .photo-modal-image.portrait-image {
        /* 安全な基本設定を維持 */
        object-fit: contain;
    }
    
    .photo-modal-image.aspect-mismatch {
        /* 安全な基本設定を維持 */
        object-fit: contain;
    }
}

/* フローティング検索ボックス - 保守性重視版 */
.map-container #floating-search.floating-search,
#floating-search.floating-search {
    position: absolute;
    top: 10px;
    left: 80px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 350px; /* 420px → 350px に縮小（内部コンテンツに適切なサイズ） */
    z-index: 1000; /* 基本フローティング要素層 */
    transition: all 0.3s ease;
    overflow: hidden;
    display: block;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateZ(0); /* ハードウェアアクセラレーション */
}

.floating-search.expanded {
    height: auto;
    max-height: 380px; /* 拡大した幅に合わせて高さも調整 */
}

#floating-search .search-header {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    background: white;
    z-index: 1001; /* 検索ボックスヘッダー */
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 16px;
    z-index: 2;
}

.search-input {
    flex: 1;
    padding: 6px 12px 6px 32px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #4CAF50;
}

.search-expand-btn {
    background: transparent;
    color: #6b7280;
    border: none;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 42px;
    transition: background-color 0.2s, color 0.2s;
}

.search-expand-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.search-expand-btn.expanded {
    /* transform削除 - 矢印は固定でテキストのみ変更 */
}

.search-content {
    max-height: 0;
    opacity: 0;
    padding: 0; /* 非展開時はパディングなし */
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease; /* パディングアニメーション明示 */
    overflow: hidden;
}

.search-content.expanded {
    max-height: 280px;
    opacity: 1;
    padding: 12px; /* 展開時にパディング適用（Tailwind p-3相当） */
}

.search-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.search-btn {
    background: #3182ce;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    flex: 0 0 auto; /* flex-grow: 0, flex-shrink: 0, flex-basis: auto */
    min-width: 45px; /* 最小幅を確保して文字が横並びになるようにする */
    white-space: nowrap; /* 文字の折り返しを防ぐ */
    transition: background-color 0.2s;
}

.search-btn:hover {
    background: #2c5aa0;
}

/* 詳細セレクタでボタン見切れ問題を解決（!important回避） */
.floating-search .search-header .search-btn {
    flex-shrink: 0;
    min-width: 50px;
    white-space: nowrap;
    font-size: 11px;
    padding: 6px 8px;
}

.floating-search .search-header .search-expand-btn {
    flex-shrink: 0;
    min-width: 32px;
    width: 32px;
    height: 32px;
}

.floating-search .search-header .search-input {
    flex: 1 1 auto;
    min-width: 80px;
    max-width: none;
}

.range-search-btn {
    background: #4a5568;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    flex: 1;
    transition: background-color 0.2s;
}

.range-search-btn:hover {
    background: #2d3748;
}

.filter-section {
    margin-bottom: 12px;
}

.filter-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #a0aec0;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.filter-option {
    padding: 4px 8px;
    border: 1px solid #4a5568;
    background: #2d3748;
    color: #f7fafc;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-option:hover {
    border-color: #63b3ed;
    background: #4a5568;
}

.filter-option.active {
    background: #3182ce;
    color: white;
    border-color: #63b3ed;
}

/* 検索結果リストパネル */
.search-results-panel {
    background: #1a202c;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #2d3748;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow: hidden;
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #2d3748;
    background: #2d3748;
    border-radius: 8px 8px 0 0;
}

.search-results-header .results-count {
    color: #f7fafc;
    font-size: 1.2rem;
    margin: 0;
    flex: 1;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 削除: .results-info は不要になった */

/* 削除: 古い .results-count スタイルは不要（新しいスタイルは .search-results-header .results-count で定義済み） */

.close-results-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-results-btn:hover {
    background: #4a5568;
    color: #f7fafc;
}

.results-sort {
    display: flex;
    gap: 8px;
    align-items: center;
}

.results-sort label {
    color: #a0aec0;
    font-size: 12px;
}

.sort-select {
    padding: 6px 12px;
    border: 1px solid #4a5568;
    border-radius: 4px;
    font-size: 12px;
    background: #2d3748;
    color: #f7fafc;
}

.search-results-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.search-result-item {
    padding: 12px;
    border: 1px solid #4a5568;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #2d3748;
}

.search-result-item:hover {
    border-color: #63b3ed;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 179, 237, 0.3);
    background: #4a5568;
}

.search-result-name {
    font-weight: 600;
    color: #f7fafc;
    margin-bottom: 4px;
    font-size: 14px;
}

.search-result-rating {
    color: #FF9800;
    font-size: 13px;
    margin-bottom: 4px;
}

.search-result-address {
    color: #a0aec0;
    font-size: 12px;
    margin-bottom: 4px;
}

.search-result-facilities {
    display: flex;
    gap: 4px;
}

.search-result-facility {
    font-size: 11px;
    background: #4a5568;
    color: #f7fafc;
    padding: 2px 6px;
    border-radius: 3px;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #a0aec0;
    font-style: italic;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .floating-search {
        width: calc(100% - 40px) !important;
        max-width: 360px !important; /* モバイルでも少し余裕を持たせる */
    }
    
    .search-results-panel {
        width: 100%;
        min-width: auto;
    }
}

/* タブレット専用（481px-768px）検索ボックス幅制限 */
@media (max-width: 768px) and (min-width: 481px) {
    .map-container #floating-search.floating-search,
    #floating-search.floating-search {
        width: 300px !important; /* 420px → 300px に縮小 */
        max-width: 300px !important;
    }
    
    /* タブレット専用ボタン調整 */
    .floating-search .search-header .search-btn {
        min-width: 48px;
        font-size: 10px;
        padding: 5px 7px;
    }
    
    .floating-search .search-header .search-expand-btn {
        min-width: 40px;
        padding: 3px 5px;
        font-size: 10px;
        gap: 1px;
    }
    
    .floating-search .search-header .search-input {
        min-width: 70px;
    }
}

/* 小型デバイス対応 */
@media (max-width: 480px) {
    .map-container #floating-search.floating-search,
    #floating-search.floating-search {
        width: calc(100% - 40px) !important; /* 固定幅から可変幅に変更 */
        max-width: 240px !important; /* 280px → 240px に縮小 */
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    .search-btn {
        font-size: 11px !important;
        padding: 6px 8px !important;
    }
    
    .search-expand-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
    
    /* モバイル専用ボタン調整（詳細セレクタ） */
    .floating-search .search-header .search-btn {
        min-width: 45px;
        font-size: 10px;
        padding: 4px 6px;
    }
    
    .floating-search .search-header .search-expand-btn {
        min-width: 38px;
        padding: 2px 4px;
        font-size: 9px;
        gap: 1px;
    }
    
    .floating-search .search-header .search-input {
        min-width: 60px;
    }
}

/* 極小画面対応（320px以下） */
@media (max-width: 320px) {
    .map-container #floating-search.floating-search,
    #floating-search.floating-search {
        width: calc(100% - 20px) !important; /* マージンをさらに縮小 */
        max-width: 200px !important; /* 240px → 200px に縮小 */
    }
    
    .search-btn {
        font-size: 10px !important;
        padding: 4px 6px !important;
    }
    
    
    #search-input {
        font-size: 12px !important;
    }
    
    /* 極小画面専用ボタン調整（詳細セレクタ） */
    .floating-search .search-header .search-btn {
        min-width: 40px;
        font-size: 9px;
        padding: 3px 5px;
    }
    
    .floating-search .search-header .search-expand-btn {
        min-width: 36px;
        padding: 2px 3px;
        font-size: 8px;
        gap: 1px;
    }
    
    .floating-search .search-header .search-input {
        min-width: 50px;
        font-size: 12px;
    }
}

/* ローディング表示 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #4a5568;
    border-top: 4px solid #3182ce;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

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

.loading p {
    color: #f7fafc;
    font-size: 1.1rem;
}

/* エラーメッセージ */
.error-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.error-content {
    background-color: #2d3748;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
    border: 2px solid #e53e3e;
}

.error-content h3 {
    color: #e53e3e;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.error-content p {
    color: #cbd5e0;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* レスポンシブデザイン（スマートフォン対応） */
@media (max-width: 768px) {
    /* 健全な詳細度向上: セレクタを具体化 */
    body .main-content {
        flex-direction: column;
        height: auto;
    }
    
    body .main-content .map-container {
        height: 40vh; /* 動的高さ: 50vh → 40vh でサイドバーとのバランス改善 */
        min-height: 280px; /* 最小高さを微調整: 300px → 280px */
        max-height: 500px; /* 最大高さを制限 */
        flex: none;
    }
    
    body .main-content .sidebar {
        flex: none;
        margin-top: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-main {
        text-align: center;
    }
    
    .header-title-container {
        gap: 2px; /* モバイルでは少し狭く */
        padding: 2px 0; /* モバイル用パディング */
    }
    
    .header-title-main {
        line-height: 1.0; /* モバイルでは少し詰める */
    }
    
    .header-title-sub {
        line-height: 1.0; /* モバイルでは少し詰める */
    }
    
    .header-title {
        font-size: 1.6rem;
    }
    
    .header-subtitle {
        font-size: 0.8rem;
    }
    
    /* 将来の復活用にコメントアウト
    .astronomy-location {
        font-size: 0.6rem;
        padding: 1px 6px;
    }
    */
    
    /* モバイルでの天文情報調整 - フィードバックボタン統合後 */
    .astronomy-info {
        position: static;
        flex-direction: column;
        align-items: center;
        margin-top: 0; /* 不要な上部余白を削除 */
        gap: 6px;
        width: 100%; /* 全幅使用 */
        max-width: none; /* 幅制限解除 */
    }
    
    .astronomy-compact {
        width: 100%; /* 全幅使用 */
        max-width: 380px; /* フィードバックボタン統合によりさらに拡張 */
        justify-content: center;
        gap: 8px; /* アイテム間のスペース拡大 */
    }
    
    .astronomy-item {
        flex: 1 1 auto; /* フレックス拡張 */
        min-width: 0; /* 幅制限解除 */
        text-align: center;
        max-width: 110px; /* 各アイテムの最大幅設定 */
    }
    
    /* モバイル用フィードバックボタン調整 */
    .astronomy-item .feedback-btn-compact {
        width: 18px;
        height: 18px;
        padding: 1px;
        margin-left: 4px;
    }
    
    .astronomy-item .feedback-btn-compact .feedback-icon {
        font-size: 9px;
    }
    
    .time-group {
        justify-content: center;
        width: 100%;
    }
    
    .map-controls {
        top: auto;
        bottom: 20px;
        right: 10px;
    }
    
    /* モバイルでのデバッグパネル調整 */
    .debug-panel-overlay {
        bottom: 5px;
        left: 5px;
        max-width: 300px;
        max-height: 200px;
        font-size: 10px;
    }
    
    .debug-btn {
        font-size: 8px;
        padding: 3px 6px;
    }
    
    /* モバイルでの口コミヘッダー調整 */
    .reviews-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .reviews-sort {
        justify-content: space-between;
    }
    
    .sort-select {
        flex: 1;
        max-width: 200px;
    }
}
    
    .btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    /* モバイルでの評価ボタンサイズ調整 */
    .rating-input label {
        padding: 4px 2px;
        font-size: 12px;
        min-width: 32px;
    }

/* ======================================
   Vue.js 統合スタイル
   ====================================== */

/* Vue.js口コミセクション全体 */
.vue-reviews-wrapper {
    width: 100%;
    margin-top: 20px;
}

/* 表示モード切り替えエリア */
.reviews-display-mode {
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.mode-button {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #4a5568;
    border-radius: 6px;
    background: #1a202c;
    color: #cbd5e0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mode-button:hover {
    border-color: #718096;
    background: #2d3748;
}

.mode-button.active {
    border-color: #3182ce;
    background: #2b6cb0;
    color: #e6fffa;
    font-weight: 600;
}

.mode-button.vanilla-mode.active {
    border-color: #f59e0b;
    background: #d69e2e;
    color: #fffbf0;
}

.mode-button.vue-mode.active {
    border-color: #10b981;
    background: #047857;
    color: #f0fff4;
}

.mode-info {
    background: #1a202c;
    border-radius: 6px;
    padding: 15px;
    border-left: 4px solid #10b981;
}

.security-info {
    margin: 0;
    font-size: 14px;
    color: #cbd5e0;
    line-height: 1.5;
}

.security-info strong {
    color: #68d391;
}

/* Vue.jsコンポーネント内スタイル */
.vue-reviews-container {
    width: 100%;
}

/* ローディング状態 */
.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.loading-state .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* エラー状態 */
.error-state {
    text-align: center;
    padding: 40px 20px;
}

.error-message {
    color: #ef4444;
    margin-bottom: 20px;
    font-size: 16px;
}

.retry-button {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.retry-button:hover {
    background: #2563eb;
}

/* 口コミなし状態 */
.vue-reviews-container .no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: #cbd5e0;
    background: #2d3748;
    border-radius: 8px;
    border: 1px solid #4a5568;
}

.vue-reviews-container .no-reviews p {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #cbd5e0;
}

.vue-reviews-container .no-reviews p:last-child {
    margin-bottom: 0;
    font-size: 14px;
    opacity: 0.8;
    color: #718096;
}

/* セキュア口コミ一覧 */
.reviews-content {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
}

.reviews-header {
    background: transparent;
    padding: 0 20px 15px 20px;
    border-bottom: 1px solid #4a5568;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.reviews-header h3 {
    margin: 0;
    color: #f7fafc;
    font-size: 18px;
    font-weight: 600;
}

.reviews-count {
    background: #10b981;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.security-badge {
    background: #047857;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 個別口コミアイテム（Vue.js用） */
.vue-reviews-container .review-item {
    background-color: #2d3748;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #3182ce;
    border-bottom: none;
    transition: background-color 0.2s;
}

.vue-reviews-container .review-item:last-child {
    margin-bottom: 0;
}

.vue-reviews-container .review-item:hover {
    background-color: #4a5568;
}

.vue-reviews-container .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.vue-reviews-container .review-author {
    font-weight: 600;
    color: #f7fafc;
    font-size: 15px;
}

.vue-reviews-container .review-rating {
    color: #ffd700;
    font-weight: 500;
    font-size: 14px;
}

.vue-reviews-container .review-comment {
    color: #cbd5e0;
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 14px;
}

.vue-reviews-container .review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #718096;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #4a5568;
}

.vue-reviews-container .review-date {
    opacity: 0.8;
}

.vue-reviews-container .review-likes {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #e53e3e;
    font-weight: 500;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .vue-reviews-wrapper {
        margin-top: 15px;
    }
    
    .reviews-display-mode {
        padding: 15px;
    }
    
    .mode-selector {
        flex-direction: column;
        gap: 8px;
    }
    
    .mode-button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .reviews-header {
        padding: 0 15px 12px 15px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .reviews-header h3 {
        font-size: 16px;
    }
    
    .review-item {
        padding: 15px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .review-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .mode-info {
        padding: 12px;
    }
    
    .security-info {
        font-size: 13px;
    }
    
    .loading-state,
    .error-state,
    .no-reviews {
        padding: 30px 15px;
    }
    
    .review-comment {
        font-size: 13px;
    }
}

/* ===============================
   ユーザー情報モーダル用アニメーション
   =============================== */

@keyframes spin {
    to { transform: rotate(360deg); }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: modal-fade-in 0.3s ease-out;
}

.modal-content {
    animation: modal-slide-in 0.3s ease-out;
    position: relative;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modal-slide-in {
    from { opacity: 0; transform: translateY(-50px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===============================
   ヘッダー水平レイアウト レスポンシブ対応
   =============================== */

/* レスポンシブ対応 */
@media (max-width: 768px) and (min-width: 481px) {
    /* タブレット専用（481px〜768px）- 通常フロー統一 */
    .header-content {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start; /* 左から順に配置 */
        padding: 4px 8px;
        gap: 4px;
        min-height: 52px; /* タブレット用高さ（タイトル重なり解消用） */
    }
    
    /* タブレット: 通常フローのためパディング調整不要 */
    .header-content.user-logged-in {
        /* 特別な調整は不要 */
    }
    
    .login-box-container {
        position: static;
        order: 0; /* 最左端に配置 */
        flex-shrink: 0;
        min-width: 120px;
        max-width: 150px; /* タブレット用サイズ */
    }
    
    .header-main {
        order: 1;
        flex: 1;
        text-align: left; /* 左揃えに統一 */
        min-width: 0;
    }
    
    .header-buttons {
        order: 3; /* 天文情報の後 */
        flex-shrink: 0;
        min-width: 28px;
    }
    
    .astronomy-info {
        order: 2; /* タイトルの後 */
        width: 75px; /* タブレット用サイズ */
        flex-shrink: 0;
    }
    
    .header-title {
        font-size: 18px;
    }
    
    /* 新タイトル構造のモバイル対応 */
    .header-title-main {
        font-size: 18px;
        line-height: 1.1;
    }
    
    .header-title-sub {
        font-size: 14px;
        color: #a0aec0;
        line-height: 1.0;
    }
    
    .header-title-container {
        gap: 0px; /* タブレットではスペースを節約 */
        padding: 1px 0;
    }
    
    .astronomy-info {
        flex-direction: row; /* column → row に変更（水平配置） */
        align-items: center; /* flex-start → center に変更 */
        gap: 4px; /* 8px → 4px に削減 */
        flex-shrink: 1; /* 縮小可能に */
        max-width: 250px; /* 最大幅を制限 */
        overflow: hidden; /* はみ出し防止 */
    }
    
    .astronomy-compact {
        flex-direction: column; /* 縦並び維持 */
        gap: 2px;
        width: 75px; /* タブレット用さらにコンパクト */
        overflow: hidden;
    }
    
    /* スマートフォンでのメインレイアウト調整 */
    :root {
        --header-height: 85px; /* スマートフォン用アバター表示対応高さ */
    }
    
    .header {
        min-height: 70px; /* モバイルアバター（56px）表示に対応 */
        padding: 8px 12px; /* アバター表示に適切なパディング */
    }
    
    body .main-content {
        flex-direction: column;
        height: calc(100vh - var(--header-height));
        padding: 5px;
        gap: 5px;
    }
    
    /* 詳細度向上: より具体的なセレクタを使用 */
    body .main-content .map-container,
    body .main-content .sidebar {
        flex: none;
        height: auto;
    }
    
    body .main-content .map-container {
        height: 40vh; /* 修正済み: サイドバーとのバランス重視 */
        min-height: 280px; /* 修正済み: 微調整 */
    }
    
    body .main-content .sidebar {
        height: 45vh; /* calc式を廃止し固定比率で改善: calc(50vh - 110px) → 45vh */
        min-height: 220px; /* 最小高さを向上: 200px → 220px */
    }
    
    /* スマートフォンでのサイドバー内コンテンツ調整 */
    .location-details {
        max-height: calc(40vh - 150px); /* 修正済み: マップ高さ変更に対応 */
    }
    
    .form-container {
        max-height: calc(40vh - 150px); /* 修正済み: マップ高さ変更に対応 */
    }
}

@media (max-width: 480px) {
    /* モバイル: 絶対配置を無効化して通常フローに戻す */
    .header-content {
        flex-direction: row !important; /* 横レイアウト維持 */
        align-items: center;
        gap: 3px; /* 要素間スペースを節約 */
        padding: 5px 6px;
        min-height: 44px; /* モバイル用高さ（タイトル重なり解消用） */
        justify-content: flex-start; /* 左から順に配置 */
    }
    
    /* 観測地詳細のヘッダーボタン対応 */
    .details-header {
        flex-wrap: wrap; /* 必要に応じて折り返し */
        gap: 8px;
    }
    
    .details-header h2 {
        flex: 1;
        min-width: 120px; /* 観測地名の最小幅保証 */
        font-size: 1.2rem; /* フォントサイズを少し小さく */
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }
    
    .details-header .header-buttons {
        flex-shrink: 0;
        min-width: 130px; /* 3つのボタンが入る幅を確保 */
        max-width: 150px; /* 最大幅制限 */
        gap: 4px; /* ボタン間隔を調整 */
        justify-content: flex-end; /* 右寄せ */
    }
    
    /* 編集リクエストボタンのモバイル対応 */
    .details-header .btn-small {
        padding: 4px 6px;
        font-size: 10px;
        min-width: 24px;
        white-space: nowrap; /* テキストの折り返し防止 */
        max-width: 60px; /* 最大幅制限 */
        overflow: hidden;
        text-overflow: ellipsis; /* 長いテキストは省略 */
        border-radius: 6px; /* 他のボタンと統一した角丸 */
    }
    
    /* 編集リクエストボタンのテキストをアイコンのみに変更（超小画面用） */
    @media (max-width: 360px) {
        .details-header .btn-small {
            font-size: 12px;
            padding: 6px;
            min-width: 32px;
            max-width: 32px;
            border-radius: 6px; /* 統一したデザイン */
        }
        
        /* テキストを隠してアイコンのみ表示 */
        .details-header .btn-small {
            text-indent: -9999px;
            position: relative;
        }
        
        .details-header .btn-small::before {
            content: "📝";
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            text-indent: 0;
            font-size: 14px;
        }
    }
    
    /* いいねボタンのモバイル対応 */
    .details-header .btn-like {
        padding: 4px 8px;
        font-size: 12px;
        gap: 3px;
    }
    
    .login-box-container {
        position: static;
        order: 0; /* 最左端に配置 */
        min-width: 105px; /* モバイル用最小化 */
        max-width: 125px;
        flex-shrink: 0;
    }
    
    .header-main {
        text-align: left; /* 左揃えに戻す */
        order: 1; /* タイトルを左側に */
        flex: 1; /* 伸縮可能 */
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* 左揃え */
    }
    
    .header-buttons {
        order: 2; /* フィードバックボタンを中央に */
        display: flex;
        gap: 4px; /* スペースを節約 */
    }
    
    .btn-small {
        padding: 4px 6px; /* さらに小さく */
        font-size: 10px;
        min-width: 28px; /* 最小幅設定 */
        border-radius: 50%; /* 円形に */
    }
    
    /* モバイル: ログイン状態でもパディング調整は不要 */
    .header-content.user-logged-in {
        /* 通常フローのため特別な調整は不要 */
    }
    
    /* モバイル用要素配置順序 */
    .header-main {
        order: 1; /* タイトルを最初に */
        flex: 1; /* 余ったスペースを使用 */
    }
    
    .header-buttons {
        order: 3; /* 天文情報の後 */
        min-width: 30px; /* モバイル用最小化 */
        max-width: 30px;
        flex-shrink: 0;
        gap: 2px;
    }
    
    .astronomy-info {
        order: 2; /* タイトルの後 */
        width: 68px; /* モバイル用最小化 */
        flex-shrink: 0;
        display: flex;
        justify-content: flex-start;
    }
    
    .astronomy-compact {
        display: flex !important;
        flex-direction: column !important; /* 縦並び維持 */
        gap: 1px;
        width: 70px; /* 最小デバイス用コンパクト */
        justify-content: flex-start;
    }
    
    .astronomy-item {
        display: flex !important; /* 強制表示 */
    }
    
    .header-title {
        font-size: 16px;
    }
    
    /* 新タイトル構造の極小デバイス対応 */
    .header-title-main {
        font-size: 16px;
        line-height: 1.0; /* モバイルではさらにコンパクト */
    }
    
    .header-title-sub {
        font-size: 12px;
        color: #9ca3af;
        line-height: 1.0;
    }
    
    .header-title-container {
        gap: 0px; /* モバイルではスペースなし */
        padding: 0;
    }
    
    .astronomy-item {
        padding: 3px 6px;
    }
    
    .astronomy-text {
        font-size: 10px;
    }
    
    .moon-phase-name {
        font-size: 9px;
    }
    
    .moon-age {
        font-size: 10px;
    }
    
    /* 小画面スマートフォンでのメインレイアウト調整 */
    :root {
        --header-height: 80px; /* 小画面でもアバター表示を考慮 */
    }
    
    .header {
        min-height: 60px; /* 小画面でも最小限のアバター表示対応 */
        padding: 6px 8px; /* 必要最小限のパディング */
    }
    
    /* 詳細度向上: セレクタを具体化 */
    body .main-content {
        flex-direction: column;
        height: calc(100vh - var(--header-height));
        padding: 3px;
        gap: 3px;
    }
    
    body .main-content .map-container {
        height: 35vh; /* サイドバー重視のため縮小: 45vh → 35vh */
        min-height: 250px;
    }
    
    body .main-content .sidebar {
        height: 50vh; /* calc式を廃止し大幅改善: calc(45vh - 80px) → 50vh */
        min-height: 200px; /* 最小高さを向上: 180px → 200px */
    }
}

/* ===============================
   モーダル表示時の画面全体ぼかし効果
   =============================== */

/* モーダル表示時に画面全体をぼかす */
.modal-active .main-content {
    filter: blur(3px);
    opacity: 0.7;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-active .header {
    filter: blur(3px);
    opacity: 0.7;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* モーダル非表示時の通常状態 */
body:not(.modal-active) .main-content {
    filter: none;
    opacity: 1;
    pointer-events: auto;
    transition: all 0.3s ease;
}

body:not(.modal-active) .header {
    filter: none;
    opacity: 1;
    pointer-events: auto;
    transition: all 0.3s ease;
}

/* 編集リクエストモーダル */
.edit-request-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    margin: 0;
    transition: opacity 0.3s ease;
}

.edit-request-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.edit-request-modal-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: transparent;
    border-radius: 8px;
    margin: auto;
    transform: translateY(0);
}

#edit-request-form-container {
    padding: 0;
}

/* モーダルが表示されているときの背景固定 */
body.modal-active-edit-request {
    overflow: hidden;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .edit-request-modal {
        padding: 10px;
    }
    
    .edit-request-modal-content {
        max-height: 95vh;
    }
}

/* ===============================
   フィードバック機能スタイル
   =============================== */

/* フィードバックボタン */
.feedback-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%; /* 円形にする */
    padding: 6px; /* アイコンのみなので小さく */
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* 固定幅 */
    height: 32px; /* 固定高さ */
    min-width: unset; /* min-widthを無効化 */
    flex-shrink: 0; /* 縮小を防ぐ */
}

.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.feedback-btn:active {
    transform: translateY(0);
}

.feedback-icon {
    font-size: 16px; /* アイコンのみなので少し大きく */
    line-height: 1; /* 行間を調整 */
}

.feedback-text {
    font-size: 11px;
}

/* フィードバックモーダル */
.feedback-modal {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.feedback-modal .modal-header {
    background: #2d3748;
    color: #f7fafc;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #4a5568;
}

.feedback-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.feedback-modal .close-modal-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.feedback-modal .close-modal-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.feedback-modal form {
    padding: 25px;
    background: #1a202c;
    border-radius: 0 0 8px 8px;
}

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

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

.feedback-modal .form-group input,
.feedback-modal .form-group select,
.feedback-modal .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #4a5568;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: #2d3748;
    color: #f7fafc;
}

.feedback-modal .form-group input:focus,
.feedback-modal .form-group select:focus,
.feedback-modal .form-group textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

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

.feedback-modal .form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #4a5568;
}

.feedback-modal .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.feedback-modal .btn-secondary {
    background-color: #4a5568;
    color: #f7fafc;
    border: 1px solid #718096;
}

.feedback-modal .btn-secondary:hover {
    background-color: #718096;
    border-color: #a0aec0;
}

.feedback-modal .btn-primary {
    background: #3182ce;
    color: #f7fafc;
    border: 1px solid #63b3ed;
}

.feedback-modal .btn-primary:hover {
    background: #63b3ed;
    border-color: #90cdf4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 179, 237, 0.4);
}

.feedback-modal .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: #2d3748;
    border-color: #4a5568;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .feedback-btn {
        width: 30px; /* モバイル用サイズ */
        height: 30px;
        padding: 4px;
        min-width: 30px;
        font-size: 12px; /* アイコンサイズ調整 */
    }
    
    .feedback-icon {
        font-size: 12px; /* モバイル用アイコンサイズ */
    }
    
    .feedback-text {
        font-size: 10px;
    }
    
    .feedback-modal {
        margin: 10px;
        max-width: calc(100vw - 20px);
    }
    
    .feedback-modal form {
        padding: 20px;
    }
    
    .feedback-modal .form-actions {
        flex-direction: column;
    }
    
    .feedback-modal .btn {
        width: 100%;
    }
}

/* ===============================
   マーカーツールチップスタイル
   =============================== */

.custom-marker-tooltip {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid #3182ce !important;
    border-radius: 6px !important;
    color: white !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    max-width: 250px !important;
    z-index: 1001 !important;
}

.custom-marker-tooltip:before {
    border-top-color: rgba(0, 0, 0, 0.8) !important;
}

/* ホバー時のスムーズな表示 */
.leaflet-tooltip {
    transition: opacity 0.2s ease-in-out !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .custom-marker-tooltip {
        font-size: 12px !important;
        padding: 6px 10px !important;
        max-width: 200px !important;
    }
}

/* ===============================
   デスクトップ専用レイアウト
   =============================== */

/* デスクトップ専用（769px以上） */
@media (min-width: 769px) {
    /* 天文情報を横並び表示に変更 */
    .astronomy-compact {
        flex-direction: row !important; /* 縦並び → 横並び */
        gap: 10px; /* 横並び用スペース拡大 */
        align-items: center;
        width: auto; /* 固定幅を解除 */
        min-width: 220px; /* 横並び用最小幅拡張 */
        max-width: 380px; /* 最大幅大幅拡張 */
    }
    
    .astronomy-item {
        flex: 0 0 auto; /* アイテム固定サイズ */
        white-space: nowrap; /* テキスト改行防止 */
        padding: 2px 4px; /* デスクトップ用パディング拡大 */
        height: auto; /* 高さ自動調整 */
        min-height: 22px; /* 14pxフォント対応で最小高さ調整 */
        line-height: 1.2; /* 統一された行間設定 */
    }
    
    .astronomy-info {
        min-width: 240px; /* デスクトップ用幅拡張 */
        max-width: 400px; /* 最大幅大幅拡張 */
        gap: 12px; /* 天文情報間のスペースさらに拡大 */
    }
    
    /* デスクトップでは天文情報を大きく表示 */
    .astronomy-text {
        font-size: 14px !important; /* デスクトップ用大幅拡大 */
        min-width: 60px; /* テキスト幅拡張 */
        color: #e2e8f0 !important; /* より明るい色で視認性向上 */
        font-weight: 600; /* フォント太字で視認性向上 */
        line-height: 1.2 !important; /* 統一された読みやすい行間 */
    }
    
    .astronomy-icon {
        font-size: 16px !important; /* アイコンサイズ拡大 */
        min-width: 18px; /* アイコン幅拡張 */
        opacity: 1; /* アイコンの明瞭度最大化 */
    }
    
    .moon-phase-name {
        font-size: 14px !important; /* 天文情報テキストと統一 */
        color: #f7fafc !important; /* 最も明るい色で強調 */
        font-weight: 600; /* 太字で視認性向上 */
        line-height: 1.2 !important; /* デスクトップ用読みやすい行間 */
        margin-bottom: 1px; /* 適度な要素間スペース */
    }
    
    .moon-age {
        font-size: 14px !important; /* 天文情報テキストと統一 */
        color: #e2e8f0 !important; /* より明るい色で視認性向上 */
        font-weight: 500; /* 中程度の太字 */
        line-height: 1.2 !important; /* デスクトップ用読みやすい行間 */
        margin-bottom: 0; /* 最下部要素はマージンなし */
    }
    
    /* デスクトップでのヘッダーボタン配置最適化 */
    .header-buttons {
        order: 3; /* 天文情報の後に配置 */
        margin-left: 8px; /* 天文情報とのスペース確保 */
        gap: 10px; /* ボタン間のスペース拡大 */
    }
    
    /* デスクトップ用ドロップダウン設定 */
    .dropdown-menu {
        min-width: 240px; /* デスクトップ用幅 */
    }
}

/* ===============================
   小さな通知エリア
   =============================== */

.notification-area {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    min-width: 250px;
    z-index: 10000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    pointer-events: none; /* 背景クリックを通す */
}

.notification-message {
    /* 背景色は個別のタイプクラスで設定 */
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-left: 2px solid #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.4;
    animation: slideInNotification 0.3s ease-out;
    pointer-events: auto; /* 通知自体はクリック可能 */
    max-height: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* デフォルト背景色（タイプが指定されていない場合） */
.notification-message:not(.info):not(.success):not(.warning):not(.error) {
    background: rgba(255, 255, 255, 0.95) !important;
}

/* より具体的なセレクタで確実に適用 */
.notification-area .notification-message.info {
    border-left-color: #93c5fd !important; /* 控えめな薄青 */
    background: rgba(147, 197, 253, 0.25) !important; /* 鮮明な青背景 */
}

.notification-area .notification-message.success {
    border-left-color: #6ee7b7 !important; /* 控えめな薄緑 */
    background: rgba(110, 231, 183, 0.25) !important; /* 鮮明な緑背景 */
}

.notification-area .notification-message.warning {
    border-left-color: #fbbf24 !important; /* 控えめな薄橙 */
    background: rgba(251, 191, 36, 0.25) !important; /* 鮮明な黄背景 */
}

.notification-area .notification-message.error {
    border-left-color: #fca5a5 !important; /* 控えめな薄赤 */
    background: rgba(252, 165, 165, 0.25) !important; /* 鮮明な赤背景 */
}

.notification-message .close-btn {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-message .close-btn:hover {
    opacity: 1;
}

@keyframes slideInNotification {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* フェードアウトアニメーション */
.notification-message.fade-out {
    animation: fadeOutNotification 0.3s ease-in forwards;
}

@keyframes fadeOutNotification {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* モバイル対応 */
@media (max-width: 480px) {
    .notification-area {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification-message {
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* ===============================
   お知らせバナー関連のスタイル
=============================== */

/* お知らせバナーのアニメーション */
@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
}

/* ===============================
   お知らせバナー - Flat & Clean スタイル
   =============================== */

.announcement-banner {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    word-wrap: break-word;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    color: #333;
    font-weight: 500;
    width: max-content;
    max-width: min(90vw, 1200px);
    min-width: 280px;
}

.announcement-banner:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* カテゴリ別のアイコンスタイル */
.announcement-banner .icon {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* メッセージテキスト */
.announcement-banner .message {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    margin: 0;
    white-space: pre-line;
    line-height: 1.4;
}

/* 閉じるボタン */
.announcement-banner .close-btn {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #666;
    flex-shrink: 0;
}

.announcement-banner .close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
    color: #333;
}

/* カテゴリ別の枠線カラー */
.announcement-banner.info {
    border-left: 4px solid #3b82f6;
}

.announcement-banner.warning {
    border-left: 4px solid #f59e0b;
}

.announcement-banner.emergency {
    border-left: 4px solid #ef4444;
}

.announcement-banner.astronomy {
    border-left: 4px solid #8b5cf6;
}

/* アニメーション定義 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOutUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

.announcement-banner {
    animation: fadeInDown 0.4s ease-out;
}

.announcement-banner.fade-out {
    animation: fadeOutUp 0.3s ease-in forwards;
}

/* タブレット対応 */
@media (max-width: 768px) {
    .announcement-banner {
        width: max-content;
        max-width: min(93vw, 600px);
        min-width: 320px;
        padding: 14px 18px;
        gap: 10px;
    }
    
    .announcement-banner .message {
        font-size: 13px;
    }
    
    .announcement-banner .icon {
        font-size: 16px;
        width: 20px;
        height: 20px;
    }
    
    .announcement-banner .close-btn {
        font-size: 16px;
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .announcement-banner {
        width: max-content;
        max-width: min(95vw, 400px);
        min-width: 300px;
        padding: 12px 16px;
        gap: 8px;
        border-radius: 6px;
    }
    
    .announcement-banner .message {
        font-size: 12px;
    }
    
    .announcement-banner .icon {
        font-size: 14px;
        width: 18px;
        height: 18px;
    }
    
    .announcement-banner .close-btn {
        font-size: 14px;
        width: 18px;
        height: 18px;
    }
    
    /* モバイル表示: 編集リクエストボタンのテキスト短縮 */
    #edit-request-btn {
        font-size: 0; /* 元のテキストを非表示 */
    }
    
    #edit-request-btn::before {
        content: "📝 編集";
        font-size: 12px;
    }
}

/* search-results-header モバイル最適化 */
@media (max-width: 480px) {
    .search-results-header {
        padding: 12px 16px; /* パディング縮小 */
    }
    
    .search-results-header .results-count {
        font-size: 1.1rem; /* 1.2rem → 1.1rem */
    }
    
    .header-controls {
        gap: 8px; /* 12px → 8px */
    }
    
    .results-sort label {
        display: none; /* 「並び順:」ラベル非表示 */
    }
    
    .sort-select {
        font-size: 11px;
        padding: 4px 8px; /* パディング縮小 */
        min-width: 80px; /* 幅制限 */
    }
    
    .close-results-btn {
        font-size: 18px; /* 20px → 18px */
        padding: 2px 6px;
    }
}

@media (max-width: 360px) {
    .search-results-header .results-count {
        font-size: 1rem; /* さらに縮小 */
    }
    
    .header-controls {
        gap: 6px;
    }
    
    .sort-select {
        font-size: 10px;
        padding: 3px 6px;
        min-width: 70px;
    }
    
    .close-results-btn {
        font-size: 16px;
        padding: 1px 5px;
    }
}

@media (max-width: 320px) {
    .search-results-header {
        padding: 10px 12px;
    }
    
    .search-results-header .results-count {
        font-size: 0.9rem;
    }
    
    .header-controls {
        gap: 4px;
    }
    
    .sort-select {
        font-size: 9px;
        padding: 2px 4px;
        min-width: 65px;
    }
    
    .close-results-btn {
        font-size: 14px;
        padding: 1px 4px;
    }
}
