/*
 * ミニマムプロトタイプで追加した画面部品の見た目（登録画面・トラベラーパネルなど）。
 * 地図まわりの見た目は map.css（デモ版のまま）。
 * 色は中間審査のスライドと同じ紺・金にそろえている。
 */
:root {
    --jjt-navy: #0d2c5b;
    --jjt-gold: #f5b13b;
    --jjt-text: #262626;
    --jjt-muted: #5a6577;
}

/* ---------------------------------------------------------------- トラベラーパネル（右上）
   左側（.traveler-panel-main）：押すと自分の位置へ地図が動く。長押しでロックオン追跡
   右端（.traveler-panel-menu「⋯」）：トラベラーメニューを開く */
#traveler-panel {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;                 /* 地図（Leaflet）より手前に出す */
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--jjt-navy);
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    font-family: "Meiryo UI", "Meiryo", sans-serif;
    color: var(--jjt-text);
    max-width: calc(100vw - 20px);
    overflow: hidden;
}
#traveler-panel .traveler-panel-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px 10px;
    cursor: pointer;
}
#traveler-panel .traveler-panel-main:hover {
    background: #fff8e8;
}
#traveler-panel .traveler-panel-icon {
    font-size: 28px;
    line-height: 1;
}
#traveler-panel .traveler-panel-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
#traveler-panel .traveler-panel-name {
    font-weight: bold;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#traveler-panel .traveler-panel-miles {
    font-size: 13px;
    color: var(--jjt-navy);
}
#traveler-panel .traveler-panel-menu {
    width: 34px;
    padding: 0;
    font-size: 20px;
    font-weight: bold;
    color: var(--jjt-navy);
    background: none;
    border: none;
    border-left: 1px solid #d6dce6;
    cursor: pointer;
}
#traveler-panel .traveler-panel-menu:hover,
#traveler-panel .traveler-panel-menu[aria-expanded="true"] {
    background: #eef1f6;
}

/* ---------------------------------------------------------------- トラベラーメニュー（「⋯」で開く） */
#traveler-menu {
    position: fixed;               /* top・right は menu.js が、トラベラーパネルの下に合わせて決める */
    z-index: 1500;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    padding: 6px;
    background: #fff;
    border: 2px solid var(--jjt-navy);
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
#traveler-menu .traveler-menu-item {
    padding: 10px 12px;
    font: bold 14px "Meiryo UI", "Meiryo", sans-serif;
    text-align: left;
    color: var(--jjt-navy);
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
#traveler-menu .traveler-menu-item:hover,
#traveler-menu .traveler-menu-item:focus {
    outline: none;
    background: #fff4da;
}

/* ---------------------------------------------------------------- 登録画面 */
#entry-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;                 /* 自分の情報パネルより、さらに手前 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(13, 44, 91, 0.55);
    font-family: "Meiryo UI", "Meiryo", sans-serif;
}
#entry-panel {
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 24px 24px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    color: var(--jjt-text);
    box-sizing: border-box;
}
#entry-panel h1 {
    margin: 0 0 4px;
    font-size: 22px;
    color: var(--jjt-navy);
}
#entry-panel .entry-lead, #info-panel .entry-lead {
    margin: 0 0 18px;
    color: var(--jjt-muted);
}
#entry-panel .entry-label, #info-panel .entry-label {
    display: block;
    margin: 14px 0 6px;
    font-weight: bold;
}
#entry-panel input[type="text"], #info-panel input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 16px;
    border: 2px solid #c4ccd8;
    border-radius: 8px;
}
#entry-panel input[type="text"]:focus, #info-panel input[type="text"]:focus {
    outline: none;
    border-color: var(--jjt-navy);
}
#entry-panel .entry-hint, #info-panel .entry-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--jjt-muted);
}
#entry-panel .entry-icons, #info-panel .entry-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 8px;
}
#entry-panel .entry-icon, #info-panel .entry-icon {
    height: 48px;
    font-size: 26px;
    background: #f4f6fa;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
}
#entry-panel .entry-icon:hover, #info-panel .entry-icon:hover {
    background: #e8edf5;
}
#entry-panel .entry-icon[aria-checked="true"], #info-panel .entry-icon[aria-checked="true"] {
    background: #fff4da;
    border-color: var(--jjt-gold);
}
#entry-panel .entry-error, #info-panel .entry-error {
    min-height: 1.4em;
    margin: 12px 0 0;
    color: #b00020;
    font-size: 14px;
}
#entry-panel .entry-start, #info-panel .entry-start {
    width: 100%;
    margin-top: 4px;
    padding: 12px;
    font-size: 17px;
    font-weight: bold;
    color: #fff;
    background: var(--jjt-navy);
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
#entry-panel .entry-start:disabled, #info-panel .entry-start:disabled {
    background: #9aa6b8;
    cursor: not-allowed;
}

/* ---------------------------------------------------------------- 画面下のボタン置き場（カルテ点数の入力・移動） */
#action-bar {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: max-content;
    max-width: calc(100vw - 32px);
}

/* ---------------------------------------------------------------- カルテ点数の入力ボタン（画面下） */
#karte-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    font: bold 16px "Meiryo UI", "Meiryo", sans-serif;
    color: #fff;
    background: var(--jjt-navy);
    border: 2px solid var(--jjt-gold);
    border-radius: 999px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}
#karte-button:hover {
    background: #163d7a;
}
#karte-button .karte-badge {
    min-width: 22px;
    padding: 1px 7px;
    font-size: 13px;
    line-height: 20px;
    color: var(--jjt-navy);
    background: var(--jjt-gold);
    border-radius: 999px;
}

/* ---------------------------------------------------------------- カルテ点数の入力画面 */
#karte-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(13, 44, 91, 0.55);
    font-family: "Meiryo UI", "Meiryo", sans-serif;
}
#karte-panel {
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 18px 22px 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    color: var(--jjt-text);
    box-sizing: border-box;
}
#karte-panel .karte-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#karte-panel h2 {
    margin: 0;
    font-size: 20px;
    color: var(--jjt-navy);
}
#karte-panel .karte-close {
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    color: var(--jjt-muted);
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
#karte-panel .karte-close:hover {
    background: #eef1f6;
}
#karte-panel .karte-lead {
    margin: 4px 0 12px;
    font-size: 14px;
    color: var(--jjt-muted);
}

/* 時間割表：日付が多いときは、表だけ横にスクロールする */
#karte-panel .karte-grid-wrap {
    overflow-x: auto;
}
.karte-grid {
    border-collapse: separate;
    border-spacing: 4px;
    margin: 0 auto;
}
.karte-grid th {
    font-size: 13px;
    font-weight: bold;
    color: var(--jjt-navy);
    white-space: nowrap;
}
.karte-grid tbody th {
    padding-right: 6px;
    text-align: right;
}
.karte-grid .karte-period {
    display: block;
    font-size: 15px;
}
.karte-grid .karte-time {
    display: block;
    font-size: 11px;
    font-weight: normal;
    color: var(--jjt-muted);
}
.karte-grid td {
    padding: 0;
}
.karte-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 64px;
    box-sizing: border-box;
    border-radius: 10px;
    font-family: inherit;
}
.karte-cell.none {
    color: #c4ccd8;
    background: #f7f8fb;
}
.karte-cell.locked {
    color: #9aa6b8;
    background: #f1f3f7;
}
.karte-cell.open {
    color: var(--jjt-navy);
    background: #fff4da;
    border: 2px solid var(--jjt-gold);
    cursor: pointer;
}
.karte-cell.open:hover {
    background: #ffe7b0;
}
.karte-cell.open.selected {
    color: #fff;
    background: var(--jjt-navy);
    border-color: var(--jjt-navy);
}
.karte-cell.done {
    color: #b3261e;
    background: #fdf1f0;
}
.karte-cell-main {
    font-size: 15px;
    font-weight: bold;
}
.karte-cell-sub,
.karte-subject {
    font-size: 11px;
}
.karte-subject {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 「済」のスタンプ（赤い丸の判子） */
.karte-stamp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 2px solid #b3261e;
    border-radius: 50%;
    transform: rotate(-12deg);
}

/* 点数の入力欄 */
#karte-panel .karte-form {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f4f6fa;
    border-radius: 12px;
}
#karte-panel .karte-hint {
    margin: 0;
    font-size: 14px;
    color: var(--jjt-muted);
}
#karte-panel .karte-selected {
    margin: 0 0 6px;
    font-weight: bold;
    color: var(--jjt-navy);
}
#karte-panel .karte-label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}
#karte-panel .karte-score-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
#karte-panel #karte-score {
    width: 90px;
    padding: 8px 10px;
    font-size: 18px;
    border: 2px solid #c4ccd8;
    border-radius: 8px;
}
#karte-panel #karte-score:focus {
    outline: none;
    border-color: var(--jjt-navy);
}
#karte-panel .karte-preview {
    font-weight: bold;
    color: var(--jjt-navy);
}
#karte-panel .karte-preview.error {
    font-weight: normal;
    color: #b00020;
}
#karte-panel .karte-submit {
    margin-top: 10px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: var(--jjt-navy);
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
#karte-panel .karte-submit:disabled {
    background: #9aa6b8;
    cursor: not-allowed;
}
#karte-panel .karte-note {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--jjt-muted);
}
#karte-panel .karte-message {
    min-height: 1.4em;
    margin: 10px 0 0;
    font-weight: bold;
    color: #1b7a3a;
}
#karte-panel .karte-message.error {
    color: #b00020;
}

/* ---------------------------------------------------------------- 移動ボタン（画面下） */
#move-button {
    padding: 12px 22px;
    font: bold 16px "Meiryo UI", "Meiryo", sans-serif;
    color: var(--jjt-navy);
    background: var(--jjt-gold);
    border: 2px solid var(--jjt-navy);
    border-radius: 999px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}
#move-button:hover {
    background: #f8c565;
}
/* 移動中は白くして、押すと移動している区間を表示する */
#move-button.moving {
    background: #fff;
}

/* ---------------------------------------------------------------- 行き先を選ぶ画面 */
#move-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(13, 44, 91, 0.55);
    font-family: "Meiryo UI", "Meiryo", sans-serif;
}
#move-panel {
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 18px 22px 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    color: var(--jjt-text);
    box-sizing: border-box;
}
#move-panel .move-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#move-panel h2 {
    margin: 0;
    font-size: 20px;
    color: var(--jjt-navy);
}
#move-panel .move-close {
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    color: var(--jjt-muted);
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
#move-panel .move-close:hover {
    background: #eef1f6;
}
#move-panel .move-lead {
    margin: 4px 0 12px;
    font-size: 14px;
    color: var(--jjt-muted);
}
#move-panel .move-items {
    margin: 0;
    padding: 0;
    list-style: none;
}
#move-panel .move-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid #e3e7ee;
}
#move-panel .move-city {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
#move-panel .move-city-name {
    font-weight: bold;
}
#move-panel .move-city-detail {
    font-size: 12px;
    color: var(--jjt-muted);
}
#move-panel .move-message {
    min-height: 1.4em;
    margin: 10px 0 0;
    color: #b00020;
}
/* 「✈ 〇〇マイル」のボタン（行き先の一覧と、地図のピンの吹き出しで使う） */
.move-go {
    flex-shrink: 0;
    padding: 6px 12px;
    font: bold 14px "Meiryo UI", "Meiryo", sans-serif;
    color: #fff;
    background: var(--jjt-navy);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}
.move-go:hover {
    background: #163d7a;
}
.move-go:disabled {
    color: #fff;
    background: #9aa6b8;
    cursor: not-allowed;
}

/* ---------------------------------------------------------------- 地図のピンの吹き出し */
.city-popup {
    font-family: "Meiryo UI", "Meiryo", sans-serif;
    text-align: center;
}
.city-popup-title {
    font-weight: bold;
    font-size: 14px;
    color: var(--jjt-navy);
}
.city-popup-note {
    margin: 2px 0 6px;
    font-size: 12px;
    color: var(--jjt-muted);
}

/* ---------------------------------------------------------------- カードボタン（画面下） */
#card-button {
    padding: 12px 22px;
    font: bold 16px "Meiryo UI", "Meiryo", sans-serif;
    color: var(--jjt-navy);
    background: #fff;
    border: 2px solid var(--jjt-navy);
    border-radius: 999px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}
#card-button:hover {
    background: #eef1f6;
}

/* ---------------------------------------------------------------- カードコレクション・手に入れたときの画面 */
#card-overlay,
#card-get-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(13, 44, 91, 0.55);
    font-family: "Meiryo UI", "Meiryo", sans-serif;
}
#card-get-overlay {
    z-index: 2200;                 /* コレクションより手前。到着のお知らせ（.toast）よりは後ろ */
}
#card-panel,
#card-get-panel {
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 18px 22px 18px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    color: var(--jjt-text);
    box-sizing: border-box;
}
#card-get-panel {
    max-width: 620px;              /* カードが2枚なら横に並ぶ幅 */
    text-align: center;
}
#card-panel .card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#card-panel h2,
#card-get-panel h2 {
    margin: 0;
    font-size: 20px;
    color: var(--jjt-navy);
}
#card-panel .card-close {
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    color: var(--jjt-muted);
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
#card-panel .card-close:hover {
    background: #eef1f6;
}
#card-panel .card-section-title {
    margin: 16px 0 8px;
    font-size: 15px;
    color: var(--jjt-navy);
}

/* 一覧：カードを並べる */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}
.card-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    font-family: inherit;
    color: var(--jjt-text);
    background: #fff9ec;
    border: 2px solid var(--jjt-gold);
    border-radius: 10px;
    cursor: pointer;
}
.card-tile:hover {
    background: #ffefc8;
}
.card-tile.country {
    background: #eef4fb;
    border-color: #7fa6d6;
}
.card-tile.locked {
    color: #9aa6b8;
    background: #f1f3f7;
    border: 2px dashed #c4ccd8;
    cursor: default;
}
.card-tile .card-picture {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    font-size: 40px;
}
.card-tile .card-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}
.card-tile-name {
    max-width: 100%;
    font-size: 12px;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 1枚を大きく見せる（一覧で押したとき・手に入れたとき） */
.card-detail {
    text-align: center;
}
.card-large {
    width: 260px;
    max-width: 100%;
    margin: 12px auto;
    padding: 16px 16px 12px;
    box-sizing: border-box;
    background: #fff9ec;
    border: 3px solid var(--jjt-gold);
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    text-align: center;
}
.card-large.country {
    background: #eef4fb;
    border-color: #7fa6d6;
}
#card-get-panel .card-get-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 12px;
}
.card-large .card-picture {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    font-size: 96px;
}
.card-large .card-picture img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}
.card-large .card-category {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--jjt-muted);
}
.card-large .card-name {
    margin: 2px 0;
    font-size: 20px;
    color: var(--jjt-navy);
}
.card-large .card-place {
    margin: 0 0 6px;
    font-size: 13px;
}
.card-large .card-place:empty {
    display: none;
}
.card-large .card-description {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
}
.card-detail .card-date {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--jjt-muted);
}
.card-back,
.card-get-buttons button {
    padding: 8px 18px;
    font: bold 14px "Meiryo UI", "Meiryo", sans-serif;
    color: var(--jjt-navy);
    background: #fff;
    border: 2px solid var(--jjt-navy);
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
}
.card-get-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
}
.card-get-buttons .card-get-open {
    color: #fff;
    background: var(--jjt-navy);
}

/* ---------------------------------------------------------------- ロックオン中のトラベラータグ（lockon.js）
   枠の太さ（border）を変えると、顔の位置がずれる（map.js の TAG_BORDER）ので、外側の光（box-shadow）で表す */
.custom-marker {
    cursor: pointer;
}
.custom-marker.lockon {
    background-color: #fff4da;
    box-shadow: 0 0 0 3px var(--jjt-gold), 0 0 12px 4px rgba(245, 177, 59, 0.9);
    animation: jjt-lockon-pulse 1.2s ease-in-out infinite;
}
@keyframes jjt-lockon-pulse {
    50% { box-shadow: 0 0 0 3px var(--jjt-gold), 0 0 20px 8px rgba(245, 177, 59, 0.5); }
}

/* ---------------------------------------------------------------- 都市ラベル（地図の上の都市名）
   押すと、ピンと同じ吹き出しが出る（map.js）。外側の枠は都市名より広いので、文字の札だけを押せるようにする */
/* leaflet.css の .leaflet-marker-icon.leaflet-interactive（押せるようにする指定）より強くするため、クラスを2つ重ねる */
.leaflet-marker-icon.city-label-icon {
    pointer-events: none;
}
.city-label-icon .city-label {
    pointer-events: auto;
    cursor: pointer;
}
.city-label-icon .city-label:hover {
    border-color: var(--jjt-navy);
    background-color: #fff;
}

/* ---------------------------------------------------------------- トラベラー情報・旅の記録の画面（共通の枠） */
#info-overlay,
#record-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;                 /* 登録画面（2000）の上にも出せるように */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(13, 44, 91, 0.55);
    font-family: "Meiryo UI", "Meiryo", sans-serif;
}
#info-panel,
#record-panel {
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 18px 22px 18px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    color: var(--jjt-text);
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.7;
}
.dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dialog-head h2 {
    margin: 0;
    font-size: 20px;
    color: var(--jjt-navy);
}
.dialog-close {
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    color: var(--jjt-muted);
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.dialog-close:hover {
    background: #eef1f6;
}

/* トラベラー情報 */
#info-panel .info-public {
    width: 100%;
    padding: 8px;
    font: 14px "Meiryo UI", "Meiryo", sans-serif;
    color: var(--jjt-muted);
    background: #f1f3f7;
    border: 2px solid #c4ccd8;
    border-radius: 8px;
}
#info-panel .info-id {
    margin: 12px 0 0;
    font-size: 11px;
    color: var(--jjt-muted);
    word-break: break-all;
}

/* 登録画面の「旅の記録を読み込んで、続きから始める」 */
#entry-panel .entry-continue {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    font: 14px "Meiryo UI", "Meiryo", sans-serif;
    color: var(--jjt-navy);
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
}

/* 旅の記録 */
#record-panel .record-lead {
    margin: 6px 0 12px;
}
#record-panel .record-commands {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
#record-panel .record-commands button,
#record-panel .record-buttons button {
    padding: 10px 8px;
    font: bold 14px "Meiryo UI", "Meiryo", sans-serif;
    color: var(--jjt-navy);
    background: #fff;
    border: 2px solid var(--jjt-navy);
    border-radius: 10px;
    cursor: pointer;
}
#record-panel .record-commands button:hover,
#record-panel .record-buttons button:hover {
    background: #fff4da;
}
#record-panel .record-commands button[hidden] {
    display: none;
}
#record-panel .record-area:not(:empty) {
    margin-top: 12px;
}
#record-panel .record-label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
}
#record-panel .record-text {
    width: 100%;
    height: 110px;
    box-sizing: border-box;
    padding: 8px;
    font: 12px Consolas, "MS Gothic", monospace;
    word-break: break-all;
    border: 2px solid #c4ccd8;
    border-radius: 8px;
    resize: vertical;
}
#record-panel .record-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
#record-panel .record-buttons .record-apply,
#record-panel .record-buttons .record-read {
    color: #fff;
    background: var(--jjt-navy);
}
#record-panel .record-buttons .record-apply:hover,
#record-panel .record-buttons .record-read:hover {
    background: #163d7a;           /* 上の「:hover で薄い色」より強くして、白い文字が読めるようにする */
}
#record-panel .record-confirm {
    padding: 12px 14px;
    background: #f4f6fa;
    border-radius: 12px;
}
#record-panel .record-confirm-title {
    margin: 0;
    font-weight: bold;
    color: var(--jjt-navy);
}
#record-panel .record-summary {
    margin: 6px 0;
    padding-left: 20px;
}
#record-panel .record-warning {
    margin: 0;
    color: #b3261e;
}
#record-panel .record-warning:empty {
    display: none;
}
#record-panel .record-last {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--jjt-muted);
}
#record-panel .record-message {
    min-height: 1.4em;
    margin: 4px 0 0;
    font-weight: bold;
    color: #1b7a3a;
    word-break: break-all;
}
#record-panel .record-message.error {
    color: #b00020;
}

/* ---------------------------------------------------------------- お知らせ（数秒で消える） */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2500;
    max-width: 90vw;
    padding: 12px 22px;
    font: bold 17px "Meiryo UI", "Meiryo", sans-serif;
    color: var(--jjt-navy);
    background: #fff;
    border: 2px solid var(--jjt-gold);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ---------------------------------------------------------------- デバッグメニュー（開発・テスト用） */
#debug-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;                 /* ほかのどの画面よりも手前 */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px 16px;
    background: rgba(0, 0, 0, 0.45);
}
#debug-panel {
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 14px 18px;
    box-sizing: border-box;
    font: 14px Consolas, "MS Gothic", monospace;
    color: #e6e6e6;
    background: #1e1e1e;
    border: 2px solid #c2410c;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
#debug-panel h2 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #fdba74;
}
#debug-panel .debug-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
#debug-panel .debug-list button {
    display: block;
    width: 100%;
    padding: 6px 10px;
    font: inherit;
    text-align: left;
    color: inherit;
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
}
#debug-panel .debug-list button:hover,
#debug-panel .debug-list button:focus {
    outline: none;
    background: #2d2d2d;
    border-color: #c2410c;
}
#debug-panel .debug-command {
    margin: 0 0 6px;
    color: #fdba74;
}
#debug-panel .debug-label {
    display: block;
    margin-bottom: 4px;
    color: #a3a3a3;
}
#debug-panel #debug-arg {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    font: inherit;
    color: #fff;
    background: #111;
    border: 1px solid #c2410c;
    border-radius: 6px;
}
#debug-panel .debug-output {
    min-height: 1.4em;
    max-height: 40vh;
    overflow: auto;
    margin: 12px 0 0;
    padding: 8px;
    white-space: pre-wrap;
    word-break: break-all;
    color: #86efac;
    background: #111;
    border-radius: 6px;
}
#debug-panel .debug-output:empty {
    display: none;
}
#debug-panel .debug-help {
    margin: 10px 0 0;
    font-size: 12px;
    color: #737373;
}

/* ---------------------------------------------------------------- テスト用の時刻で動いているときの表示 */
#debug-banner {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    max-width: 90vw;
    padding: 6px 14px;
    font: bold 13px "Meiryo UI", "Meiryo", sans-serif;
    color: #fff;
    background: #c2410c;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
