/*
宙の辻 - Sora no Tsuji
Copyright (c) 2026- Sora no Tsuji Project

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
*/

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

*,
*::before,
*::after {
    font-family: sans-serif;
}

#map {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

/* --- 断面標高図パネル --- */
/* --- 辻検索パネル --- */
#tsujisearch-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 33.33%;
    background-color: rgba(30, 30, 30, 0.9);
    border-top: 1px solid #555;
    z-index: 910;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-sizing: border-box;
    color: #eee;
}

#tsujisearch-panel.hidden {
    display: none;
}

#tsujisearch-panel.with-elevation {
    bottom: 33.33%;
}

#tsujisearch-header {
    padding: 4px 10px;
    font-size: 13px;
    color: #aaa;
    border-bottom: 1px solid #444;
    flex-shrink: 0;
}

#tsujisearch-content {
    flex: 1;
    overflow-y: auto;
    padding: 4px 10px;
    font-size: 14px;
}

#tsujisearch-content .td-row {
    padding: 3px 4px;
    cursor: pointer;
    border-radius: 3px;
    white-space: nowrap;
}

#tsujisearch-content .td-row:hover {
    background: rgba(255, 255, 255, 0.12);
}

#tsujisearch-content .td-table {
    width: 100%;
    border-collapse: collapse;
}

#tsujisearch-content .td-table th,
#tsujisearch-content .td-table td {
    padding: 3px 6px;
    text-align: left;
    white-space: nowrap;
}

#tsujisearch-content .td-table th {
    color: #aaa;
    font-weight: normal;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: sticky;
    top: 0;
    background: #1a1a2e;
    z-index: 1;
    cursor: pointer;
}

#tsujisearch-content .td-table th:hover {
    color: #fff;
}

#tsujisearch-content .td-table tr.td-data-row {
    cursor: pointer;
    border-radius: 3px;
}

#tsujisearch-content .td-table tr.td-data-row:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* --- 標高グラフ パネル --- */
#elevation-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 33.33%;
    background-color: rgba(30, 30, 30, 0.9);
    border-top: 1px solid #555;
    z-index: 900;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-sizing: border-box;
}

#elevation-panel.hidden {
    display: none;
}

#elevation-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* プログレスバー */
#progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#progress-overlay.hidden {
    display: none;
}

.progress-label {
    color: #fff;
    margin-bottom: 5px;
    font-size: 14px;
    text-shadow: 0 1px 2px #000;
}

.progress-track {
    width: 80%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: #ffd700;
    transition: width 0.2s;
}

/* =========================================
   モーダル共通レイアウト (ヘルプ & グラフ)
   ========================================= */
#help-modal,
#graph-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;

    /* トランジション（フェードイン・アウト用） */
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

/* 非表示状態 */
#help-modal.hidden,
#graph-modal.hidden {
    opacity: 0;
    pointer-events: none;
    /* display: none; だとアニメーションしないためopacity制御推奨ですが、
       既存の動作を変えないなら display: none; でもOKです */
    display: none;
}

/* モーダルの中身（枠） */
.help-content {
    background: white;
    width: 90%;
    max-width: 700px;
    /* 少し幅を広げて読みやすく */
    max-height: 85%;
    border-radius: 4px;
    /* 角丸を少し鋭角にしてフォーマルに */
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;

    /* フォント設定: ゴシック体を優先 */
    font-family: sans-serif;
    color: #333;
}

/* =========================================
   ヘルプ & グラフ ヘッダー
   ========================================= */
.help-header {
    padding: 15px 20px;
    border-bottom: 2px solid #555;
    /* 濃い青背景をやめてシンプルに */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    /* 白背景 */
    color: #333;
    border-radius: 4px 4px 0 0;
}

.help-header h2 {
    margin: 0;
    font-size: 1.4em;
    font-weight: bold;
}

.close-help {
    cursor: pointer;
    font-size: 24px;
    color: #777;
    transition: color 0.2s;
}

.close-help:hover {
    color: #000;
}

/* =========================================
   ヘルプ本文エリア (スクロール領域)
   ========================================= */
.help-body {
    padding: 20px 30px;
    overflow-y: auto;
    font-size: 15px;
    /* 少し大きく */
    line-height: 1.7;
    /* 行間を広めに */
}

/* セクション区切り */
.help-section {
    margin-bottom: 30px;
}

/* 見出し (H3) */
.help-section h3,
.help-body h3 {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    border-left: 5px solid #555;
    /* 左線アクセント */
    border-bottom: none;
    /* 下線は廃止 */
    padding-left: 12px;
    margin-top: 0;
    margin-bottom: 15px;
}

/* 本文テキスト */
.help-section p,
.help-body p {
    margin-bottom: 12px;
    text-align: justify;
    /* 両端揃えで美しく */
}

/* リスト */
.help-list,
.help-body ul {
    margin-top: 5px;
    margin-bottom: 15px;
    padding-left: 20px;
    list-style-type: disc;
}

.help-list li,
.help-body li {
    margin-bottom: 6px;
}

/* リード文 */
.lead-text {
    font-weight: bold;
    color: #000;
}

/* =========================================
   気差係数コラム (フォーマル版)
   ========================================= */
.k-knowledge-section-formal {
    background-color: #fcfcfc;
    border: 1px solid #ddd;
    padding: 25px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.k-knowledge-section-formal h3 {
    border-left: none;
    /* コラム内のH3は左線なし */
    border-bottom: 1px solid #aaa;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.k-knowledge-section-formal h4 {
    font-size: 1.05em;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 10px;
    color: #444;
}

/* 数式ボックス */
.formula-box-formal {
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    margin: 15px 0;
}

.formula-formal {
    text-align: center;
    font-family: sans-serif;
    font-size: 1.1em;
    margin: 10px 0;
    overflow-x: auto;
}

.formula-list {
    margin-top: 10px;
    padding-left: 20px;
    font-size: 0.95em;
}

.note-formal {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* テーブルスタイル */
.k-table-formal {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    margin-top: 15px;
    border: 1px solid #ccc;
}

.k-table-formal th,
.k-table-formal td {
    border: 1px solid #ccc;
    padding: 10px 12px;
    vertical-align: top;
    text-align: left;
}

.k-table-formal th {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: center;
    color: #333;
}

.k-table-formal td:nth-child(1) {
    background-color: #f9f9f9;
    font-weight: bold;
    width: 25%;
}

/* --- コントロールパネル --- */
.control-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 90%;
    max-width: 360px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-family: sans-serif;
    font-size: 14px;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

.control-panel.minimized {
    width: auto;
    max-width: none;
}

.panel-header {
    background: #2c3e50;
    color: white;
    padding: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ロゴ画像のスタイル */
.header-logo {
    height: 20px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
    margin-bottom: 2px;
}

/* ヘッダー右側のコントロール群 */
.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}

#btn-help {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid white;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

#btn-help:hover {
    background: rgba(255, 255, 255, 0.2);
}

.header-subtitle {
    font-weight: normal;
    font-size: 0.9em;
}

.control-panel.minimized .header-subtitle {
    display: none;
}

.panel-content {
    display: block;
    overflow-y: auto;
    padding: 0;
}

.control-panel.minimized .panel-content {
    display: none;
}

.section {
    border-bottom: 1px solid #eee;
}

.section:last-child {
    border-bottom: none;
}

.section-header {
    padding: 10px;
    background: #f4f4f4;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    user-select: none;
    font-size: 14px;
}

.section-header:hover {
    background: #eaeaea;
}


.section-content {
    padding: 10px;
    display: block;
}

.section-content.closed {
    display: none;
}

#sec-myobs { background-color: rgba(144, 238, 144, 0.15); }
#sec-mytgt { background-color: rgba(255, 165, 0, 0.15); }
#sec-mytsuji { background-color: rgba(186, 85, 211, 0.15); }

.control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 5px;
}

.control-row label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.nav-btn,
input[type="date"],
input[type="time"],
input[type="number"],
input[type="text"],
select,
.style-indicator {
    height: 34px;
    font-size: 16px;
    font-family: sans-serif;
    box-sizing: border-box;
    vertical-align: middle;
}

input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    vertical-align: middle;
}

.nav-btn {
    background: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    color: #333;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #ddd;
}

.nav-btn.small {
    padding: 0 8px;
}

/* ボタンサイズ調整 */
#btn-now,
#btn-gps,
#btn-reg-start,
#btn-reg-end,
#btn-url-location,
#btn-reg-settings {
    width: 46px;
    min-width: 46px;
    padding: 0;
    justify-content: center;
    flex-shrink: 0;
}

#btn-month-prev,
#btn-date-prev,
#btn-date-next,
#btn-month-next,
#btn-hour-prev,
#btn-time-prev,
#btn-time-next,
#btn-hour-next {
    width: 34px;
    min-width: 34px;
    padding: 0;
    justify-content: center;
    flex-shrink: 0;
}

#btn-moon-prev,
#btn-moon-next {
    width: 34px;
    min-width: 34px;
    padding: 0;
    justify-content: center;
    flex-shrink: 0;
}

#reset-btn {
    width: 68px;
    min-width: 68px;
    padding: 0;
    justify-content: center;
    flex-shrink: 0;
}

/* メインボタン（辻ライン・辻検索・標高グラフ）横並び用 */
.main-buttons-row {
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

.main-btn {
    flex: 1;
    /* 横幅を均等に分ける */
    padding: 0;
}

/* メインボタンが押された時のスタイル */
#btn-dp.active,
#btn-tsuji-search.active {
    background-color: #ffd700;
    color: #000;
    border-color: #e6c200;
    font-weight: bold;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-group-left {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 70px;
    flex-shrink: 0;
}

.spacer-group {
    width: 70px;
    flex-shrink: 0;
}

.input-label {
    width: 105px;
    flex-shrink: 0;
    text-align: right;
    margin-right: 5px;
}

.tsujisearch-label {
    width: 175px;
    flex-shrink: 0;
    text-align: right;
    margin-right: 5px;
}

.control-row.left-row {
    display: flex;
    align-items: center;
    justify-content: left;
    margin-bottom: 10px;
    gap: 5px;
}

/* 辻検索メニュー内の水平線 */
.tsujisearch-separator {
    border: none;
    border-top: 1px solid;
    margin: 8px 0;
}

/* 月齢フィルタの入力不可時の背景色 */
input[type="number"]:disabled {
    background-color: #f0f0f0;
    color: #999;
}

/* My辻検索 一括選択トグル: 「一括解除」状態 */
.mytsuji-toggle-active {
    background-color: yellow !important;
    color: black !important;
    font-weight: bold !important;
}

/* API取得標高の読み取り専用テキストボックス */
/* API取得標高の読み取り専用テキストボックス */
input[type="number"].elev-readonly,
input[type="number"].elev-input {
    flex-grow: 1;
    padding: 0 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: right;
    min-width: 0;
}
input[type="number"].elev-readonly {
    background-color: #f0f0f0;
    color: #666;
}

/* btn-group-left内のスペーサー */
.spacer-btn {
    width: 46px;
    flex-shrink: 0;
}

.nav-btn.active {
    background-color: #ffd700;
    color: #000;
    border-color: #e6c200;
    font-weight: bold;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="date"],
input[type="text"],
select {
    flex-grow: 1;
    padding: 0 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 0;
}

input[type="date"],
input[type="time"] {
    text-align: center;
}

input[type="number"] {
    flex-grow: 1;
    padding: 0 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: right;
    min-width: 0;
    /* 追加: テキスト入力欄と挙動を合わせる */
}

#time-input {
    width: auto;
    flex-grow: 1;
    text-align: center;
    padding: 0 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 0;
}

.moon-row {
    background: #f0f4f8;
    padding: 8px;
    border-radius: 6px;
    margin-top: 10px;
}

.moon-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

#moon-age-input {
    width: 75px;
    /* 60px -> 75px に変更 (4文字対応) */
    text-align: center;
    padding: 0 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.moon-icon {
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 34px;
    width: 34px;
    justify-content: center;
}

/* Movボタン跡のスペーサー（Nowボタンと同じ幅） */
.spacer-btn-now {
    width: 46px;
    min-width: 46px;
    flex-shrink: 0;
}

input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.shortcuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 5px;
    background: #f9f9f9;
    padding: 5px;
    border-radius: 4px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    min-height: 24px;
}

.shortcut-item label {
    cursor: pointer;
    font-size: 14px;
    margin-left: 4px;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    font-weight: normal;
}

.shortcut-detail {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.shortcut-alt {
    font-size: 12px;
    color: #666;
}

.twilight-group {
    background: rgba(100, 149, 237, 0.08);
    border-radius: 4px;
    padding: 5px;
    margin-bottom: 10px;
}

.twilight-group-title {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 4px;
    padding-left: 2px;
}

.twilight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
}

.twilight-spacer {
    visibility: hidden;
}

.celestial-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.celestial-list li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.celestial-list li:last-child {
    border-bottom: none;
}

.body-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.style-indicator {
    width: 34px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
    position: relative;
    background-color: #fff;
    flex-shrink: 0;
}

.style-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 4px;
    right: 4px;
    height: 2px;
    background: currentColor;
    transform: translateY(-50%);
}

.style-indicator.dashed::after {
    background: transparent;
    border-top: 2px dashed currentColor;
}

.body-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.body-name-label {
    font-weight: bold;
    font-size: 15px;
    display: block;
}

.body-name-id {
    font-size: 10px;
    color: #555;
    margin-top: 2px;
    display: block;
}

.body-detail-text {
    font-size: 10px;
    color: #555;
    margin-top: 2px;
    display: block;
    line-height: 1.3;
}

.style-palette {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    width: 250px;
    border: 1px solid #ccc;
}

.style-palette.hidden {
    display: none;
}

.palette-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
}

.close-palette {
    cursor: pointer;
    font-size: 20px;
}

/* --- 地名検索ポップアップ --- */
.location-picker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1a1a2e;
    color: #eee;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);
    z-index: 2000;
    width: 300px;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    border: 1px solid #444;
}

.location-picker.hidden {
    display: none;
}

.picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
}

.close-picker {
    cursor: pointer;
    font-size: 20px;
}

.picker-list {
    overflow-y: auto;
    flex: 1;
    max-height: 50vh;
}

.picker-item {
    padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.picker-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.picker-item .picker-name {
    font-size: 14px;
}

.picker-item .picker-address {
    font-size: 12px;
    color: #aaa;
}

.palette-colors {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.color-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ccc;
    cursor: pointer;
}

.palette-lines .line-option {
    padding: 8px;
    cursor: pointer;
    border: 1px solid #eee;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.line-preview {
    width: 50px;
    height: 2px;
    background: black;
    display: inline-block;
}

.line-preview.dashed {
    background: transparent;
    border-top: 2px dashed black;
}

/* パレット内リセットボタン */
.palette-reset-area {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    text-align: right;
}

.palette-reset-btn {
    padding: 0 12px;
    font-size: 13px;
}

/* --- 設定セクション調整 --- */
/* =========================================
   設定セクション (気象パラメータ)
   ========================================= */

/* 気象計算ボックス (青い囲み) */
.meteo-box {
    background: #f0f8ff;
    /* 薄い青色 */
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #cce5ff;
}

/* 入力フォーム */
.meteo-input {
    width: 80px;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: right;
    font-family: inherit;
    /* フォント継承 */
}

.meteo-label {
    width: 120px;
    margin-right: 8px;
    text-align: right;
    flex-shrink: 0;
}

.refraction-row {
    justify-content: flex-start;
}

.refraction-row .meteo-label {
    width: 90px;
}

.refraction-row .meteo-input {
    flex: 1;
}

/* リセットボタンエリア */
.meteo-reset-area {
    text-align: right;
}

/* 登録ボタンエリア */
.action-area {
    text-align: center;
}

/* --- フッター --- */
.panel-footer {
    padding: 15px;
    text-align: center;
    font-size: 11px;
    color: #888;
    border-top: 1px solid #eee;
    background: #fafafa;
}

/* --- 訪問者カウンター --- */
.visitor-counter {
    padding: 10px;
    background: #f0f4f8;
    border-top: 1px solid #ddd;
    font-size: 11px;
    color: #555;
}

.counter-table {
    width: 100%;
    border-collapse: collapse;
}

.counter-table td {
    text-align: center;
    padding: 2px 0;
}

.counter-thanks {
    font-weight: bold;
}

.clickable-stat {
    cursor: pointer;
    text-decoration: underline;
    color: #2c3e50;
}

.clickable-stat:hover {
    color: #007bff;
}

/* グラフモーダル調整 */
.graph-content {
    width: 95%;
    max-width: 800px;
    height: auto;
}

#visitor-canvas {
    width: 100%;
    background: #fff;
}

/* 地図マーカー */
.location-marker {
    width: 24px;
    height: 24px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    translate: -1.3px -13px;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.location-marker-observer {
    background-color: #2196F3;
}
.location-marker-target {
    background-color: #F44336;
}

/* --- 天体検索ポップアップ --- */
.starsearch-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1200;
    width: 320px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.starsearch-popup.hidden {
    display: none;
}

.starsearch-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.close-starsearch-popup {
    cursor: pointer;
    font-size: 18px;
    color: #888;
}

.close-starsearch-popup:hover {
    color: #333;
}

.starsearch-popup-content {
    overflow-y: auto;
    padding: 4px;
    flex: 1;
}

.starsearch-result-item {
    padding: 6px 8px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    border-radius: 4px;
}

.starsearch-result-item:hover {
    background: #e8f4fd;
}

.starsearch-result-name {
    font-weight: bold;
    font-size: 14px;
}

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

.starsearch-result-keys {
    font-size: 11px;
    color: #999;
    word-wrap: break-word;
}

.starsearch-no-result {
    padding: 16px;
    text-align: center;
    color: #999;
}

/* --- 天体検索メニュー --- */
.starsearch-options {
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.starsearch-options label {
    font-size: 12px;
    margin-right: 4px;
}

.starsearch-result {
    gap: 4px;
    align-items: center;
}

/* --- My天体メニュー --- */
.mystars-controls {
    gap: 4px;
    padding: 4px 0;
}

.mystars-empty {
    padding: 8px;
    color: #999;
    font-size: 13px;
    text-align: center;
    list-style: none;
}

.mystars-radio {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

/* --- My観測点 / My目的点 --- */
.mypoint-list {
    overflow-y: visible;
}

.mypoint-row {
    border-bottom: 1px solid #ddd;
    padding: 6px 0;
}

.mypoint-row-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    gap: 5px;
}

.mypoint-id {
    font-size: 16px;
    color: #666;
    white-space: pre;
}

.mypoint-name,
.mypoint-latlng {
    flex: 1;
    min-width: 0;
}

.mypoint-label {
    white-space: nowrap;
    margin-right: 2px;
}

.mypoint-elev,
.mypoint-height {
    width: 70px;
    flex-shrink: 0;
}

.mypoint-error {
    min-height: 0;
}

.mypoint-error-text {
    color: red;
    font-weight: bold;
    font-size: 13px;
}

/* My辻検索 行内エラー表示 */
.mytsuji-row-error {
    min-height: 0;
    margin: 4px 0;
}

.mytsuji-label {
    width: 73px;
    white-space: wrap;
    margin-right: 2px;
}

.mytsuji-obsid,
.mytsuji-tgtid,
.mytsuji-base-az,
.mytsuji-base-alt,
.mytsuji-offset-az,
.mytsuji-offset-alt,
.mytsuji-offset-az-dist,
.mytsuji-offset-alt-dist,
.mytsuji-tol-az,
.mytsuji-tol-alt,
.mytsuji-moon-base,
.mytsuji-moon-tol {
    width: 75px;
}

/* 「全て登録」ボタンの dirty 状態 */
.nav-btn.dirty {
    color: red;
    font-weight: bold;
}

/* My観測点マーカー (緑) */
.location-marker-myobs {
    background-color: #4CAF50;
}

/* My目的点マーカー (橙) */
.location-marker-mytgt {
    background-color: #FF9800;
}

