/*
メインカラー：#1e88e5
アクション：#2196f3
リンクテキスト：#1e88e5
オレンジ：#fb8c00
背景から―：#e3f2fd
*/

/* リセットCSS */
*,*::before,*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 16px;
    vertical-align: baseline;
}
a{
   text-decoration: none;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
 }
 
 /* Header styles */
header {
   position: fixed;
   top: 0;
   width: 100%;
   height: 72px;
   background-color: #ffffff;
   padding: 1rem 0;
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
   z-index: 1001;
}

.header-container {
   width: 100%;
   max-width: 1200px;
   margin: 0 auto;
   padding: 0 20px;
   display: flex;
   justify-content: space-between;
   align-items: center;
   height: 100%;
}

.logo {
   flex-shrink: 0;
}

.logo img {
   display: block;
   height: 40px;
   width: auto;
}

/* ナビゲーション基本設定 */
.navigation {
   margin-left: auto;
   display: flex;
   align-items: center;
}

.navigation-primary {
   display: flex;
   list-style: none;
   margin: 0;
   padding: 0;
   gap: 2rem;
}

.navigation-primary-item {
   position: relative;
}

.navigation-primary-link {
   display: block;
   padding: 1rem 0;
   color: #333;
   text-decoration: none;
   transition: color 0.3s ease;
}

.navigation-primary-link:hover {
   color: #0066cc;
}

.navigation-primary-link.active::after {
   content: '';
   position: absolute;
   bottom: 0;
   left: 0;
   width: 100%;
   height: 2px;
   background-color: #0066cc;
}

/* ハンバーガーメニュー関連 */
.navigation-toggle {
   display: none;
}

.navigation-toggle-label {
   display: none;
}



/* パンくずリスト全体のスタイル */
.breadcrumb-nav {
   margin: 73px 0 0;
   padding: 10px 15px;
   background-color: #f8f9fa;
   border-radius: 4px;
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* パンくずリストの基本スタイル */
.breadcrumb-list {
   list-style: none;
   margin: 0;
   padding: 0;
   display: flex;
   flex-wrap: wrap;
   align-items: center;

   max-width: 1163px;
    margin: auto;
}

/* 各パンくずリスト項目 */
.breadcrumb-item {
   display: inline-flex;
   align-items: center;
   margin: 0;
   padding: 0;
}

/* リンクスタイル */
.breadcrumb-item a {
   color: #007bff;
   text-decoration: none;
   font-weight: 400;
}

/* リンクホバー時 */
.breadcrumb-item a:hover {
   text-decoration: underline;
   color: #0056b3;
}

/* 区切り線（CSSで矢印を作成） */
.breadcrumb-separator {
   display: inline-block;
   margin: 0 8px;
   width: 6px;
   height: 6px;
   border-top: 1px solid #6c757d;
   border-right: 1px solid #6c757d;
   transform: rotate(45deg);
}

/* 現在のページスタイル */
.breadcrumb-current {
   color: #6c757d;
   font-weight: 500;
}








 
 /* Main content styles */
 main {
    flex: 1;
    padding: 15px 0 40px;  /* ヘッダーの高さ分を上部にパディング */
 }
 
 .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
 }

 /* ここから */
 
 /* Section styles */
section {
   margin-bottom: 3rem;
}


.container h1 {
   font-size: 20px;
   font-weight: bold;
   background-color: #1e88e5;
   color: #fff;
   padding: 4px 5px 6px 12px;
   margin: 0 0 10px 0;
}
.container h2 {
   font-size: 20px;
   margin-bottom: 5px;
   font-weight: bold;
}

.sun .calendar-container h2 {
   position: absolute;
   left: 50%;
   transform: translateX(-50%);
   margin: 0;
}


.container h3 {
   font-size: 22px;
   color: #1a1a1a;
   border-bottom: 4px solid #1e88e5;
   padding: 8px 12px;
   margin-bottom: 15px;
}


/* Today's info styles */
.today-data {
   display: flex;
   gap: 2rem;
   margin-bottom: 2rem;
}

.sunrise-info, .sunset-info {
   flex: 1;
   padding: 1.5rem;
   background-color: #f8f9fa;
   border-radius: 8px;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sunrise-info h3, .sunset-info h3 {
   font-size: 1.25rem;
   margin-bottom: 1rem;
   color: #333;
}

.sunrise-info time, .sunset-info time {
   display: block;
   font-size: 2rem;
   font-weight: 700;
   color: #0066cc;
   margin-bottom: 0.5rem;
}

/* Sun Arc Section */
.sun-arc-section {
   max-width: 500px;
   margin: 0 auto 30px;
   padding: 0;
   font-family: Arial, sans-serif;
}

#moon-marker {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}


.sun-content-wrapper {
   display: flex;
   gap: 20px;
   max-width: 1200px;
   margin: 0 auto;
   padding: 0 5px;
}

.sun-arc-section,
.table-section {
   flex: 1;
}

.current-info {
   margin: 0 0 0px;
   padding: 5px 0;
   text-align: center;
   background-color: #f5f5f5;
   line-height: 1.2;
}
#current-moon-position,
#current-sun-position,
#current-time{
   font-size: 14px;
}

.sun-times {
   display: flex;
   justify-content: space-between;
   margin-bottom: 10px;
}

.sunrise-time span,
.sunset-time span {
   font-size: 0.9em;
}

#sunrise-value,
#sunset-value {
   font-size: 18px;
   font-weight: bold;
}

.sun-arc-container {
   position: relative;
   margin: 0;
   overflow: hidden;
   background: linear-gradient(to bottom, #87CEEB, #E0F6FF);
   position: relative;
   height: 250px;
}

.sun-path {
   position: absolute;
   bottom: 0;
   left: 0;
   width: 100%;
   height: 100%;
}

.sun-path svg {
   width: 100%;
   height: 100%;
}

.sun-arc {
   fill: none;
   stroke: rgba(255, 215, 0, 0.5);
   stroke-width: 2;
}

#sun-marker {
   position: absolute;
   width: 24px;
   height: 24px;
   background-color: #FFD700;
   border-radius: 50%;
   box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
   transform: translate(-50%, -50%);
   z-index: 5;
}

.detail-times {
   display: flex;
   justify-content: space-between;
   font-size: 14px;
   margin-top: 10px;
   position: relative;
   z-index: 2;
}

.detail-times > div {
   text-align: center;
   line-height: 1.2;
}

.detail-times span {
   display: block;
   font-weight: bold;
}

.direction-info {
   font-size: 0.9em;
   margin-top: 2px;
   color: #666;
}

#solar-noon-value {
   font-weight: 500;
}



.detail-times .moonrise-time,
.detail-times .moonset-time,
.detail-times .solar-noon,
.detail-times .sunset-time,
.detail-times .sunrise-time {
   background-color: rgba(255, 255, 255, 0.8);
   padding: 5px;
}

#night-sky {
   z-index: 1;
}

/* Navigation */
.date-navigation {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin: 0px 0;
   padding: 10px;
   /*
   background: #e9e9e9;
   */

}

.sun .calendar{
   height: 587px;
}

.calendar-nav {
   width: 100%;
   padding: 10px;
}

.nav-wrapper {
   display: flex;
   justify-content: space-between;
   align-items: center;
   position: relative;
}

.nav-button {
   padding: 8px 16px;
   border: none;
   background-color: #fb8c00;
   color: white;
   border-radius: 4px;
   cursor: pointer;
   font-weight: bold;
}

.nav-btn {
   padding: 5px 10px;
   background-color: #fb8c00;
   color: white;
   border: none;
}

.nav-btn:hover,
.nav-button:hover {
   background-color: #f57c00;
   cursor: pointer;
}

.current-date {
   font-weight: bold;
   font-size: 1.1em;
}

/* Tabs */
.tabs {
   display: flex;
   width: 100%;
   border: 1px solid #ccc;
   font-weight: bold;
}

.tab {
   padding: 10px 20px;
   font-size: 16px;
   cursor: pointer;
   flex-basis: 50%;
   flex-shrink: 0;
   text-align: center;
   border: none;
   border-left: 1px solid #ccc;
}

.tab:first-child {
   border-left: none;
}

.tab.active {
   padding: 10px 20px;
   background-color: #fff;
   background-color: #1e88e5;
   color: #fff;
   font-weight: bold;
}

#table-list {
   display: none;
}

/* 最近訪れた地域 */
#sun-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 1rem;
}

.location-item {
    flex: 0 0 calc(25% - 0.75rem);
    min-width: 200px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
}

.location-item a {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #1e88e5;
}

.location-item .today-data {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin: 0;
}

.location-item .sunrise-info,
.location-item .sunset-info {
    flex: 1;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    box-shadow: none;
}

.location-item h3 {
    font-size: 0.8rem;
    margin: 0 0 0.3rem 0;
    border: none;
    padding: 0;
    color: #666;
}

.location-item time {
    display: block;
    font-weight: bold;
    margin-bottom: 0.2rem;
    font-size: 1rem;
    color: #333;
}

.location-item p {
    margin: 0;
    color: #666;
    font-size: 0.75rem;
}


/*月・日の出トップ*/
.moontop .map-search-container,
.suntop .map-search-container {
    display: flex;
    gap: 5px;
    margin: 0 0 20px;
}
.moontop .moon-map-container,
.suntop .sun-map-container {
    flex: 2;
}
.moontop .moon-search-container,
.suntop .sun-search-container {
    flex: 1;
}
.moontop #map,
.suntop #map {
    width: 100%;
    height: 40vh;
}

.moontop h2,
.suntop h2 {
    text-align: center;
}


.location-item .moonrise-info,
.location-item .moonset-info,
.location-item .sunrise-info,
.location-item .sunset-info {
    flex: 1;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    box-shadow: none;
}

.location-item h3 {
    font-size: 0.8rem;
    margin: 0 0 0.3rem 0;
    border: none;
    padding: 0;
    color: #666;
}

.location-item time {
    display: block;
    font-weight: bold;
    margin-bottom: 0.2rem;
    font-size: 1rem;
    color: #333;
}

.location-item p {
    margin: 0;
    color: #666;
    font-size: 0.75rem;
}

.no-history {
    width: 100%;
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

.no-history p {
    margin: 0;
    line-height: 1.5;
}

.no-history p:first-child {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.delete-history {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    padding: 0;
    color: #666;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 1;
}

.delete-history:hover {
    background: #f0f0f0;
    color: #666;
}

/* Tables */
table {
   width: 100%;
   border-collapse: collapse;
   background-color: #fff;
}

caption {
   font-size: 1.1rem;
   margin-bottom: 1rem;
   text-align: left;
   color: #666;
}

thead th {
   background-color: #f8f9fa;
   font-weight: 600;
}

tbody tr:hover {
   background-color: #f8f9fa;
}

/* Calendar Table */
.calendar th, 
.calendar td {
   padding: 2px 5px 8px;
   text-align: center;
   border: 1px solid #ccc;
}

.calendar th {
   padding: 5px 5px 5px;
}

.calendar .date {
   font-weight: bold;
}

.calendar .moon-times, 
.calendar .sun-info {
   display: flex;
   gap: 5px;
}

.calendar .moon-item,
.calendar .sun-item {
   flex: 1;
}

.calendar .moonset,
.calendar .moonrise,
.calendar .Sunrise,
.calendar .Sunset {
   font-size: 12px;
   background-color: #f0f0f0;
   color: #333;
}

.calendar .moonrise-time,
.calendar .moonset-time,
.calendar .Sunrise_time,
.calendar .Sunset_time {
   margin-bottom: 10px;
   background-color: #fff;
   
}

.calendar .holiday-name {
   font-size: 10px;
}

/* Sun Detail Table */
.moon_detail,
.sun_detail {
   width: 100%;
   border-collapse: collapse;
   margin: 0px 0;
   font-size: 14px;
   text-align: center;
}

.moon_detail th,
.moon_detail td,
.sun_detail th,
.sun_detail td {
   border: 1px solid #ccc;
   padding: 10px;
}
.moon_detail th,
.sun_detail th {
   padding: 5px 10px;
}

/* Sun Data Table */
.moon-data-table,
.sun-data-table {
   width: 100%;
   border-collapse: collapse;
}



.moon-data-table th,
.moon-data-table td,
.sun-data-table th,
.sun-data-table td {
   padding: 5px 8px;
   border: 1px solid #ccc;
}
.moon-data-table th,
.sun-data-table th {
   vertical-align: middle;
   width: 30%;
   line-height: 1.2;
   font-weight: normal;
   font-size: 14px;
}
.moon-data-table td,
.sun-data-table td {
   width: 35%;
   text-align: center;
   line-height: 1.2;
   font-size: 18px;
}

.moon-data-table .table-sub-title,
.sun-data-table .table-sub-title {
   font-size: 12px;
   color: #666;
}

#table-civil-dawn div:first-child {
   color: #666;
   font-size: 10px;
}

/* Table Header Design */
.moon-data-table th,
.sun-data-table th,
.calendar th,
.sun_detail thead th {
   background-color: #f5f5f5;
   font-weight: bold;
}

/* Special Date Styles */
.calendar td.today ,
.moon_detail tr.today,
.sun_detail .today,
.calendar .today {
   background-color: #FFFFCC !important;
}

#ja .moon_detail .sat,
#ja .sun_detail .sat,
#ja .calendar .sat {
   background-color: #e9f4fe;
}

#ja .moon_detail .holiday,
#ja .moon_detail .sun,
#ja .sun_detail .holiday,
#ja .sun_detail .sun,
#ja .calendar .sun,
#ja .calendar .holiday {
   background-color: #ffdddd;
}


/* nearby-regions */

.nearby-regions-grid {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 1rem;
   list-style-type: none;
}

.nearby-regions-grid-item {
   background-color: white;
   border: 1px solid #e0e0e0;
   border-radius: 4px;
   transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nearby-regions-grid-item:hover {
   transform: translateY(-5px);
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nearby-regions-grid-item a {
   display: block;
   padding: 1rem;
   color: #1a73e8;
   font-weight: 500;
   text-align: center;
}

.nearby-regions-grid-item a:hover {
   color: #0d47a1;
}

/* Footer */
footer {
   background-color: #f8f9fa;
   padding: 2rem 0;
   margin-top: auto;
}

footer nav {
   margin-bottom: 1.5rem;
}

footer nav ul {
   display: flex;
   gap: 1.5rem;
   list-style: none;
   justify-content: center;
}

footer nav a {
   color: #666;
   text-decoration: none;
   font-size: 0.9rem;
}

footer nav a:hover {
   color: #333;
}

footer small {
   display: block;
   text-align: center;
   color: #666;
   font-size: 0.875rem;
}
/*年間グラフ*/
#chart-container {
   position: relative;
   height: 30vh;
   overflow: hidden;
}


/*季節イベントタブ*/


.celestial-container {
   padding: 0 5px;
   margin-top: -17px;
}

.celestial-tab-navigation {
   display: flex;
   border-bottom: 1px solid #e5e7eb;
   margin-bottom: 1rem;
}

.celestial-tab-button {
   padding: 1rem;
   border: none;
   background: none;
   cursor: pointer;
   font-size: 1rem;
   color: #6b7280;
   border-bottom: 2px solid transparent;
}

.celestial-tab-button:hover {
   color: #374151;
}

.celestial-tab-button.active {
   color: #2563eb;
   border-bottom-color: #2563eb;
   font-weight: bold;
}

.celestial-tab-panel {
   display: none;
   padding: 0 0px;
}

.celestial-tab-panel.active {
   display: block;
}

.celestial-event-list-item {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 8px 8px;
   border-bottom: 1px solid #e5e7eb;
}

.celestial-event-title {
   font-weight: 500;
}

.celestial-event-datetime {
   color: #6b7280;
}


/*マップPOPアップ用*/
.custom-city-popup .city-popup {
   width: 100%;
}

.custom-city-popup .city-name {
   font-weight: bold;
}

.custom-city-popup p {

   margin:0 !important;
}

.custom-city-popup .city-details {
   width: 100%;
}

.custom-city-popup table {
   width: 100%;
   border-collapse: collapse;
   margin-top: 3px;
}


.leaflet-popup-content {
   width: inherit !important;
   font-size: 12px !important;
}



.city-popup  th,
.city-popup  td,
.custom-city-popup table th, 
.custom-city-popup table td {
   border: 1px solid #ddd;
   text-align: center;
   padding: 5px 5px 2px;
   white-space: nowrap;
   font-size: 13px;
}
.custom-city-popup table td span {
   font-size: 13px;
}

.city-popup table th,
.custom-city-popup table th {
   background-color: #f0f0f0;
   font-weight: bold;
   font-size: 12px;
   padding: 2px 0px 1px;
}


        /*フリーワード検索*/
        #searchbox{
         margin: 10px 0 0 0;
        }
        .search-container {
         width: 100%;
         max-width: 36rem;
         margin: 0 auto;
       }

       .search-input-wrapper {
         position: relative;
       }

       .search-input-inner {
         position: relative;
       }

       .search-input {
         width: 100%;
         padding: 0.5rem 1rem 0.5rem 2.5rem;
         border: 1px solid #e2e8f0;
         
         outline: none;
       }

       .search-input:focus {
         border-color: #3b82f6;
         box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
       }

       .search-icon {
         position: absolute;
         left: 0.75rem;
         top: 41%;
         transform: translateY(-50%);
         width: 1.25rem;
         height: 1.25rem;
         color: #9ca3af;
       }

       .search-results {
         margin-top: 0.5rem;
         background-color: white;
         box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
         border: 1px solid #e2e8f0;
       }

       .search-no-results {
         margin-top: 0.5rem;
         padding: 1rem;
         background-color: white;
         border-radius: 0.5rem;
         border: 1px solid #e2e8f0;
       }

       .search-no-results-text {
         margin: 0;
         text-align: center;
         color: #6b7280;
         font-size: 0.875rem;
       }

       .results-list {
         list-style: none;
         margin: 0;
         padding: 0;
         border-top: 1px solid #e2e8f0;
       }

       .result-item {
         border-bottom: 1px solid #e2e8f0;
       }

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

       .result-link {
         display: block;
         padding: 5px 10px;
         text-decoration: none;
         color: inherit;
         transition: background-color 0.2s ease;
       }

       .result-link:hover {
         background-color: #f3f4f6;
       }

       .result-content {
         display: flex;
         flex-direction: column;
         gap: 0.25rem;
       }

       .result-title {
         display: flex;
         gap: 0.5rem;
         font-size: 14px;
         font-weight: 500;
         line-height: 1.4;
       }

       .result-prefecture {
         color: #1f2937;
       }

       .result-city {
         color: #374151;
       }

       .result-district {
         font-size: 0.875rem;
         color: #6b7280;
       }

       .search-error {
         margin-top: 0.5rem;
         padding: 0.75rem;
         color: #dc2626;
         background-color: #fee2e2;
         border-radius: 0.5rem;
         border: 1px solid #fecaca;
       }
/*
       @keyframes spin {
         to {
           transform: rotate(360deg);
         }
       }
       */

       .animate-spin {
         animation: spin 1s linear infinite;
       }



       
       /*フリーワード検索*/


/*月関連*/

#moon-marker {
   position: absolute;
   width: 40px;
   height: 65px; /* 月齢テキスト用に高さを確保 */
   transform-origin: center 20px; /* 回転の中心を上部に調整 */
   transition: all 0.5s ease-out;
   left: 50%;
   top: 50%;
}
.moonAge {
   width: 100%;
   height: 100%;
   background-size: contain;
   background-position: center;
   background-repeat: no-repeat;
}

.moon-age-text {
   position: absolute;
   top: 50px;
   left: 0px;
   width: 40px;
   text-align: center;
   font-size: 12px;
   text-shadow: 0 0 3px rgba(255,255,255,0.8);
   z-index: 10;
   pointer-events: none;
   color: #333;
   font-weight: bold;
   white-space: nowrap;
}

.moon-age-text.night {
   color: #fff;
   text-shadow: 0 0 3px rgba(0,0,0,0.8);
}

/* 月の出入り時刻のスタイル */
.moon-item {
   text-align: center;
}

/* 月の可視性マップのスタイル */
.custom-popup {
    padding: 10px;
}

.custom-popup h3 {
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #ccc;
}

.moon-info {
    margin-top: 10px;
    padding: 0px 0;
    border-radius: 5px;
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 5px;
}

.moon-phase-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 5px;
}

.moon-visibility {
    display: inline-flex;
    align-items: center;
    margin-bottom: 5px;
}

.moon-marker {
    transition: all 0.3s ease;
}

/* カレンダーのセルスタイル */
.calendar td {
   height: 100px;
   padding: 5px;
   vertical-align: top;
}

.moon-day .date {
   font-weight: bold;
   margin-bottom: 3px;
}



.moon-age {
   font-size: 14px;

}

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

/* 曜日と祝日のスタイル */
.calendar th.sun,
.calendar td.sun .date,
.moon_detail tr.sun td:first-child {
   color: #e60012;
}


.calendar th.sat,
.calendar td.sat .date,
.moon_detail tr.sat td:first-child {
   color: #0068b7;
}

.calendar td.holiday .date,
.moon_detail tr.holiday td:first-child {
   color: #e60012;
}

/* 祝日名のスタイル */
.holiday-name {
   font-size: 0.8em;
   color: #e60012;
   margin: 2px 0;
}


/*topページ*/

.suntop .search-box,
.moontop .search-box {
            position: relative;
            margin: 0;
        }
        .suntop #searchInput,
        .moontop #searchInput {
            width: 100%;
            padding: 12px 20px;
            font-size: 16px;
            border: 2px solid #ddd;
            border-radius: 4px;
            transition: border-color 0.3s;
            box-sizing: border-box;
            background: white;
        }
        .suntop #searchInput:focus,
        .moontop #searchInput:focus {
            outline: none;
            border-color: #1e88e5;
        }
        .suntop .result-info,
        .moontop .result-info {
            color: #666;
            margin: 0;
            font-size: 14px;
            padding: 10px 20px;
            background: white;
            border-left: 2px solid #ddd;
            border-right: 2px solid #ddd;
            border-bottom: 1px solid #eee;
            display: none;
        }
        .suntop .result-info.active,
        .moontop .result-info.active {
            display: block;
        }
        .suntop .loading,
        .moontop .loading {
            display: none;
            color: #1e88e5;
            font-weight: bold;
        }
        .suntop #results,
        .moontop #results {
            background: white;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            max-height: 500px;
            overflow-y: auto;
            border-radius: 0 0 8px 8px;
            border: 2px solid #ddd;
            border-top: none;
        }
        .suntop #results:empty,
        .moontop #results:empty {
            display: none;
        }
        .suntop .result-item,
        .moontop .result-item {
            padding: 12px 20px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: background-color 0.2s;
            display: flex;
            justify-content: space-between;
            align-items: center;
            text-decoration: none;
            color: inherit;
        }
        .suntop .result-item:hover,
        .moontop .result-item:hover {
            background-color: #f5f5f5;
        }
        .suntop .result-item:last-child,
        .moontop .result-item:last-child {
            border-bottom: none;
        }
        .suntop .location-name,
        .moontop .location-name {
            font-size: 15px;
            color: #333;
            flex: 1;
        }
        .suntop .location-url,
        .moontop .location-url {
            font-size: 13px;
            color: #2196F3;
            margin-left: 15px;
            text-decoration: underline;
        }
        .suntop .table-badge,
        .moontop .table-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 3px;
            font-size: 11px;
            font-weight: bold;
            margin-right: 8px;
        }
        .suntop .badge-ja,
        .moontop .badge-ja {
            background: #4CAF50;
            color: white;
        }
        .suntop .badge-enus,
        .moontop .badge-enus {
            background: #2196F3;
            color: white;
        }
        .suntop .no-results,
        .moontop .no-results {
            padding: 40px;
            text-align: center;
            color: #999;
        }
        .suntop .highlight,
        .moontop .highlight {
            background-color: #fff3cd;
            font-weight: bold;
        }


         /*地域一覧*/

        .controls {
            display: flex;
            justify-content: center;
            margin: 30px 0 30px;
        }

        .filter-buttons {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: center;
        }

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

        .filter-btn {
            padding: 8px 16px;
            border: 2px solid #1e88e5;
            background: white;
            color: #1e88e5;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 14px;
            font-weight: bold;
        }

        .filter-btn:hover {
            background: #1e88e5;
            color: white;
        }



        /* ラジオボタンによる表示制御 */
        .filter-container .region-section {
            display: none;
        }

        #all:checked ~ .region-view .region-section {
            display: block;
        }

        

        /* 地域別表示 */
        .region-view {
            display: block;
        }

        .region-section {
            margin-bottom: 40px;
            background: #f8f9fa;
            border-radius: 15px;
            padding: 25px;
        }

        .region-title {
            font-size: 1.5rem;
            color: #333;
            margin-bottom: 20px;
            text-align: center;
            background: linear-gradient(45deg, #1e88e5, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .region-prefectures {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 15px;
        }

        .region-prefecture {
            display: block;
            background: white;
            padding: 15px;
            border-radius: 10px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            border: 1px solid #ccc;
            color: #333;
            text-decoration: none;
        }

        .region-prefecture:hover {
            border-color: #1e88e5;
            transform: scale(1.05);
            color: #1e88e5;
            text-decoration: none;
        }

                    /* 汎用的な地域フィルターCSS */
            .filter-container input[type="radio"] {
                display: none;
            }

            /* チェックされたラジオボタンに対応するラベルのスタイル */
            .filter-container input[type="radio"]:checked + label {
                background: #1e88e5;
                color: white;
            }

            /* デフォルトで全ての地域セクションを非表示 */
            .filter-container .region-section {
                display: none;
            }

            /* "all" がチェックされている場合は全て表示 */
            .filter-container input[data-filter="all"]:checked ~ .region-view .region-section {
                display: block;
            }

/* 国・地域選択セクション */
        .country-section {
         /*   
         max-width: 1200px;
            margin: 0 auto;
            background: white;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            */
        }
               
        .section-title {
            font-size: 18px;
            font-weight: 600;
            color: #1a73e8;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .globe-icon {
            width: 24px;
            height: 24px;
            fill: #1a73e8;
        }
        
        .section-subtitle {
            color: #666;
            font-size: 13px;
        }
        
        /* 国選択ボタン */
        .country-links-compact {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }
        
        .country-link-compact {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 18px;
            background: white;
            border: 2px solid #e0e0e0;
            border-radius: 25px;
            text-decoration: none;
            color: #333;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        
        .country-link-compact:hover {
            background: #1a73e8;
            color: white;
            border-color: #1a73e8;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(26,115,232,0.2);
        }
        
        .country-link-compact.current {
            background: #e8f0fe;
            border-color: #1a73e8;
            color: #1a73e8;
            font-weight: 600;
            pointer-events: none;
        }
        
        .country-link-compact.coming-soon {
            opacity: 0.5;
            cursor: not-allowed;
            background: #f5f5f5;
        }
        
        .country-link-compact.coming-soon:hover {
            background: #f5f5f5;
            color: #333;
            border-color: #e0e0e0;
            transform: none;
            box-shadow: none;
        }
        
        .flag-small {
            width: 20px;
            height: 15px;
            border-radius: 2px;
            object-fit: cover;
        }
        
        .badge-new {
            background: #ea4335;
            color: white;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 10px;
            margin-left: 4px;
            font-weight: 600;
        }
        
        /* レスポンシブ */
        @media (max-width: 768px) {
            .country-section {
                padding: 20px;
            }
                       
            .country-links-compact {
                gap: 8px;
            }
            
            .country-link-compact {
                padding: 8px 14px;
                font-size: 13px;
            }
        }


/* スマートフォン対応 ////////////////////////////////////////////////////////////////////////////////////////////////////*/

@media (max-width: 768px) {
   .header-container {
       position: relative;
   }

   .navigation {
       margin-left: 0;
       position: static;
   }

   .navigation-toggle-label {
       display: block;
       position: absolute;
       right: 20px;
       top: 50%;
       transform: translateY(-50%);
       width: 30px;
       height: 24px;
       cursor: pointer;
       z-index: 2;
   }

   /* ハンバーガーアイコン */
   .navigation-toggle-icon,
   .navigation-toggle-icon::before,
   .navigation-toggle-icon::after {
       content: '';
       position: absolute;
       width: 100%;
       height: 2px;
       background: #333;
       transition: all 0.3s ease;
   }

   .navigation-toggle-icon {
       top: 50%;
       transform: translateY(-50%);
   }

   .navigation-toggle-icon::before {
       top: -8px;
   }

   .navigation-toggle-icon::after {
       bottom: -8px;
   }

   /* メニュー本体 */
   .navigation-primary {
       display: none;
       flex-direction: column;
       position: absolute;
       top: 100%;
       left: 0;
       width: 100%;
       background: white;
       box-shadow: 0 2px 5px rgba(0,0,0,0.1);
       padding: 1rem;
       gap: 1rem;
   }

   .navigation-primary-item {
       width: 100%;
       text-align: center;
   }

   .navigation-primary-link {
       padding: 0.75rem 0;
       width: 100%;
       text-align: left;
   }

   /* チェックボックスでメニュー開閉 */
   .navigation-toggle:checked ~ .navigation-primary {
       display: flex;
   }

   /* ハンバーガーアイコンのアニメーション */
   .navigation-toggle:checked ~ .navigation-toggle-label .navigation-toggle-icon {
       background: transparent;
   }

   .navigation-toggle:checked ~ .navigation-toggle-label .navigation-toggle-icon::before {
       top: 0;
       transform: rotate(45deg);
   }

   .navigation-toggle:checked ~ .navigation-toggle-label .navigation-toggle-icon::after {
       bottom: 0;
       transform: rotate(-45deg);
   }

               .filter-buttons {
                justify-content: center;
            }

            .region-prefectures {
                grid-template-columns: repeat(2, 1fr);
            }


   .celestial-tab-button {
       font-size: 0.875rem;
       padding: 0.75rem;
   }


   /*フリーワード検索*/
   .search-container {
      max-width: 100%;
    }

    .result-title {
      flex-direction: column;
      gap: 0.25rem;
    }
  /*フリーワード検索*/

   .sun-content-wrapper {
       flex-direction: column;
       padding: 0 10px;
   }

   .sun-arc-section,
   .table-section {
       width: 100%;
       margin: 10px 0;
       max-width: none;
   }

   .sun-data-table th,
   .sun-data-table td {
       padding: 8px;
       font-size: 14px;
   }

   header h1 {
       font-size: 1.25rem;
   }

   .today-data {
       flex-direction: column;
       gap: 1rem;
   }

   table {
       display: block;
       overflow-x: auto;
       white-space: nowrap;
   }

   .nearby-regions-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}

/* 画面サイズが小さい端末向けの追加調整 */
@media (max-width: 480px) {
   .header-container {
       padding: 0 15px;
   }

   .navigation-toggle-label {
       right: 15px;
   }

   header nav ul {
       gap: 1rem;
   }

   section h2 {
       font-size: 1.5rem;
   }

   .sun-info {
       flex-direction: column;
       gap: 10px;
   }

   .sun-item {
       text-align: center;
   }

   .nearby-regions-grid {
      grid-template-columns: 1fr;
  }
}