.btn-primary {
  color: #FFF;
  background-color: #3B85AC;
  border-color: #3B85AC;
}
.btn-primary:hover {
  color: #FFF;
  background-color: #35779B;
  border-color: #35779B;
}

.btn-secondary {
  color: #FFF;
  background-color: #BE9A67;
  border-color: #BE9A67;
}
.btn-secondary:hover {
  color: #FFF;
  background-color: #AB8A5C;
  border-color: #AB8A5C;
}

.btn-outline-success {
  color: #99AF6E;
  background-color: #FFF;
  border-color: #99AF6E;
}
.btn-outline-success:hover {
  background-color: #8A9E63;
  border-color: #8A9E63;
}

.btn-danger {
  color: #FFF;
  background-color: #C30D23;
  border-color: #C30D23;
}
.btn-danger:hover {
  color: #FFF;
  background-color: #AF0B1F;
  border-color: #AF0B1F;
}

.btn-warning {
  color: #FFF;
  background-color: #D6805B;
  border-color: #D6805B;
}
.btn-warning:hover {
  color: #FFF;
  background-color: #C07352;
  border-color: #C07352;
}

.btn-info {
  color: #FFF;
  background-color: #00CCCC;
  border-color: #00CCCC;
}
.btn-info:hover {
  color: #FFF;
  background-color: #00B3B3;
  border-color: #00B3B3;
}

.btn-dark {
  color: #FFF;
  background-color: #595959;
  border-color: #595959;
}
.btn-dark:hover {
  color: #FFF;
  background-color: #505050;
  border-color: #505050;
}

.btn-light {
  color: #3B85AC;
  border: 1px solid #3B85AC;
}
.btn-light:hover {
  color: #35779B;
  border: 1px solid #35779B;
}

dl, ol, ul {
    margin: 0;
    padding: 0px 0px 0px 0px;
}
.bottom-sheet {
    font-family: 'Noto Sans', system-ui, sans-serif;
    border-radius: 15px;
    background-color: #f1f6f8;
    height: calc(var(--vh) * 65);
    position: fixed;
    top: calc(var(--vh) * 75);
    margin-bottom:  env(safe-area-inset-bottom);
    overflow-y: hidden;
    z-index: 5;
}
.bottom-sheet__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.sheet-drag-bar {
    margin: auto;
    width: 100%;
    text-align: center;
    display: block;
    border: none;
    background-color: #203354;
    user-select: none;
    cursor: pointer;
    padding: 0 1rem 1rem 1rem;  
    touch-action: none;           /* Hammerに全面委譲（上下スワイプを取りこぼさない） */
    -ms-touch-action: none;
}
.sheet-drag-bar img{
    margin-top: 10px;
    margin-bottom: 10px;
    margin-right: 150px;
    margin-left: 150px;
    width: 20px;
}
.contents-target-message {
    display: block;
    margin: 10px;
}
.header-bottom-sheet {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}
.sheet-drag-bar,
.header-bottom-sheet {
  flex: 0 0 auto;
}

.content-bottom-sheet {
    background-color: #f1f6f8;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 10px;
    padding-bottom: 20px;
    flex: 1 1 auto;
    min-height: 0;
    cursor: pointer;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom:  env(safe-area-inset-bottom);
    display: none;
    -webkit-overflow-scrolling: touch; /* 慣性 */
}
.tab-contents {
    height: 100%;
    width: 100%;
    border-top: none;
}
.content.is-display {
    display: block;
    height: 100%;
}

.info-container {
    height: 50%;  /* Adjusting for navbar height */
    width: 100%;
    overflow-y: auto;
}

.badge {
    font-size: 0.8em; /* フォントサイズを調整 */
    padding: .6em .8em; /* パディングを調整 */
    line-height: 2; /* 1.5倍の行間隔を設定。この数値は必要に応じて調整可能 */
    margin-bottom: 10px; /* 下方向へのマージンを設定 */
}

.badge:hover {
    cursor: pointer;  /* マウスカーソルをハンドアイコンに変更 */
    opacity: 0.7;  /* 要素の透明度を変更して、マウスオーバー時の視覚的なフィードバックを提供 */
}
.spinner {
    display: none; /* 最初は非表示にします。*/
    margin: 0 auto;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.pref-bottun{
    margin: .5em;
}

.city-bottun{
    margin: .5em;
}

.hidden {
    display: none !important;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7); /* 白色の半透明 */
    z-index: 2000; /* 他の要素より前面に表示 */
    display: flex;
    align-items: center;
    justify-content: center;
}
.loader {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
.loadMore {
    display: none;
}
.autocomplete-items, .autocomplete-history-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    margin-right: 65px;
    border-bottom: none;
    border-top: none;
    z-index: 1000;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(var(--vh) * 10); /* 高さ制限をつける */
    overflow-y: auto; /* 縦スクロールを可能に */
    overflow-x: hidden; /* 横スクロールを非表示に */
}
.autocomplete-items div, .autocomplete-history-items div {
    padding: 5px;
    cursor: pointer;
    background-color: #fff; 
    border-bottom: 1px solid #d4d4d4; 
}
.autocomplete-items div:hover, .autocomplete-history-items div:hover {
    background-color: #e9e9e9; 
}
.mask {
    background-color: #000000;
    opacity: 0.5;
    display: none;
    height: 100vh;
    width: 100%;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2;
}
#target {
    width: 100%;
}
.information_list {
    list-style: inside;
}
.keyphrase_list {
    margin: 10px;
    list-style: inside;
}
.contents-characters,
.contents-cultural_assets,
.contents-cultural_assets,
.contents-cases,
.contents-spots,
.contents-quest,
.contents-city {
    display: block;
    margin-left: 10px;
    margin-right: 10px;
}
.buttons-characters,
.buttons-cultural_assets,
.buttons-cultural_assets,
.buttons-cases,
.buttons-spots {
    margin-right: 10px;
}
.buttons-quests {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.modal-content {
    background-color: #203354;
    border-radius: 15px;
}
.modal-title {
    font-family: 'Noto Sans', system-ui, sans-serif;
    color: #FFF;
}
.modal-body {
    text-align: left;
    border-radius: 0 0 15px 15px;
    background-color: #D9E4EA;
    color: #203354;
    font-family: 'Noto Sans', system-ui, sans-serif;
    word-break: normal;
    overflow-wrap: break-word;
    line-break: auto;
}
.btn-close {
    filter: brightness(0) invert(1);
}
.btn-dark {
    padding: 0 8px;
}
.btn-group, .btn-loadMore {
    padding: 0 8px; /* パディングを調整 */
    margin: 5px 0;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    touch-action: manipulation;
}
.content {
    padding: 0px;
}
.row-map {
    height: calc(var(--vh) * 80);
    width: 100%;
}
#map {
    top: 0%;
    height: 100%;
    width: 100%;
    z-index: 1;
}
.bottom-sheet {
    left: 0;
    display: block;
    width: 100%;
}
.row {
    display: flex;
}
.btn-success.area-bottun, .btn-success.current-bottun {
    padding: 0;
    border: none;
    background: transparent;
}
.btn-success img {
    display: block;
    width: 40px;
    padding: 5px;
    border: solid 1px #000000;
    border-radius: 10px;
    margin-left: 10px;
    margin-right: 10px;
}
.row>* {
    padding: 0px;
}

#btn-current-location-svg-container svg {
  filter: drop-shadow(0px 3px rgba(0,0,0,0.4));
}

.leaflet-bar {
    box-shadow: none;
    border: none !important;
}

.freewordSearch {
    border: none;
}

input[type="text"] {
    font-family: 'Noto Sans', system-ui, sans-serif;
    color: #203354;
    font-size: 16px;
    width: 100%;
    height: 40px;
    padding: 0 16px;
    border-radius: 6.5px 6.5px !important;
    border: 1px solid #d9d9d9;
}
input[type="text"]::placeholder {
    color: rgba(138, 137, 136, .3);
}

#clear-btn {
    height: 40px;
}

.leaflet-bottom.leaflet-right {
    padding-bottom: 30px;
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: #595959 !important;
    color: white !important;
}

.leaflet-popup-content {
    margin: 0 !important;
}

.tooltip-pref {
    background-color: #708448 !important;
    color: #FFF !important;
    opacity: 0.8 !important;
    font-size: 1.2em !important;
    z-index: 500;
    border-radius: 15px !important;
    padding: 4px 12px !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}
.tooltip-pref::before {
    border-top-color: #708448 !important;
}
.tooltip-city {
    background-color: #D6805B !important;
    color: #FFF !important;
    opacity: 0.8 !important;
    font-size: 1.2em !important;
    z-index: 400;
}
.tooltip-target {
    background-color: #C30D23 !important;
    color: #FFF !important;
    opacity: 0.8 !important;
    font-size: 1.2em !important;
    z-index: 1000;
}
.tooltip-relation {
    background-color: #00CCCC !important;
    color: #FFF !important;
    opacity: 0.8 !important;
    font-size: 1.2em !important;
    z-index: 900;
}

.tooltip-normal {
  z-index: 0;
  font-size: 10px;
  padding: 0 !important;
  background-color: rgba(255,255,255,.5) !important;
  border-color: rgba(255,255,255,.5) !important;
}

.tooltip-normal::before {
  border-bottom-color: rgba(255,255,255,.5) !important;
}

.marker-cluster-wiki div {
  background-color: rgba(59, 133, 172, 0.8);
  color: #FFFFFF;
}

.marker-cluster-other div {
  background-color: rgba(160, 160, 160, 0.8);
}

/* Quest Button (MYSTORY style) */
.quest-image-item {
    margin-bottom: 10px;
}

.quest-button-link {
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.quest-button-link:hover {
    transform: scale(1.02);
}

.quest-button-wrapper {
    position: relative;
    display: block;
}

.quest-button-img {
    width: 100%;
    height: auto;
}

.quest-button-text {
    position: absolute;
    top: 50%;
    left: 30%;
    right: 5%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: left;
    line-height: 1.3;
}

/* ヘルプボタン（ボトムシートの移動に追従しない） */
.map-help-btn {
    position: fixed;
    top: 30px;
    left: 20px;
    z-index: 1000;
    width: 45px;
    height: 45px;
    background-color: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


/* 現在地ボタンの位置調整（ボトムシートの移動に追従しない） */
.leaflet-top.leaflet-right {
    position: fixed !important;
    top: 20px;
    right: 10px;
}
.map-help-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.map-help-btn svg {
    width: 40px;
    height: 40px;
    color: #203354;
}

/* ヘルプモーダル */
#helpModal .modal-body {
    background-color: #D9E4EA;
    padding: 0;
}
#helpModal iframe {
    width: 100%;
    height: 60vh;
    border: none;
    border-radius: 0 0 15px 15px;
}

#wikiLinks {
    border-radius: 0 0 15px 15px;
}

/* 行きたい・行ったボタン */
#wikiModalFooter {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 12px 16px;
    background-color: #203354;
    border-top: none;
    border-radius: 0 0 15px 15px;
}

.btn-want-to-go,
.btn-visited {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 20px;
    border: 2px solid;
    font-family: 'Noto Sans', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-want-to-go {
    background-color: #fff;
    color: #C30D23;
    border-color: #C30D23;
}

.btn-want-to-go:hover {
    background-color: #fef0f0;
}

.btn-want-to-go.active {
    background-color: #C30D23;
    color: #fff;
}

.btn-want-to-go.active svg {
    fill: #fff;
}

.btn-visited {
    background-color: #fff;
    color: #3B85AC;
    border-color: #3B85AC;
}

.btn-visited:hover {
    background-color: #fdf8f0;
}

.btn-visited.active {
    background-color: #3B85AC;
    color: #fff;
}

.btn-visited.active svg {
    fill: #fff;
}

/* 認証モーダル */
.auth-modal-body .auth-view {
    max-width: 480px;
    margin: 0 auto;
}

/* エラーモーダル用オーバーレイ（wikiModalとの間に挟む） */
#errorModalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1060 !important;
}

#checkinErrorModal {
    z-index: 1065 !important;
}

/* 認証モーダル用オーバーレイ（wikiModalとの間に挟む） */
#authModalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1070 !important;
}

#authModal {
    z-index: 1080 !important;
}
