@charset "UTF-8";

/* 変数設定 */
:root {
  /* 色 */
  --color-base:#333;
  --color-white:#FFFFFF;

  /* フォント */
  --font-size-base: 14px;
  --font-size-lg: 1.25rem;
  --font-size-sm: 0.875rem;
 
  /* 背景 */
  --background-color-base:#FFFFFF;
  --background-color-dark:#333;
}


/* 全体設定 */
* {
  font-family:Noto Sans JP;
}


/* 基本設定 */

body {
  background-color: var(--background-color-base);
  color: var(--color-base);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}



h1 {
  margin: 0;
  font-size: 30px;
}

.header-logo {
  height: 70px;
  width: auto;
  display: block;
}


h2{
  font-size: 26px;
}

h3{
  font-size: 16px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ヘッダーのスタイル */
header {
  padding: 4px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.header-sns-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-sns-row .share-icon {
  width: 20px;
  height: 20px;
}
.header-sns-row .share-icon svg {
  width: 11px;
  height: 11px;
}

@media (max-width: 768px) {
  .header-sns-row { display: none; }
}

.header-btn-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-itinerary-btn,
.header-bookmark-btn {
  font-size: var(--font-size-sm);
  padding: 3px 0;
  width: 150px;
  border: 1px solid #aaa;
  border-radius: 20px;
  background: none;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  box-sizing: border-box;
  vertical-align: middle;
}
.header-itinerary-btn:hover,
.header-bookmark-btn:hover {
  background-color: #f5f5f5;
  color: #333;
}

.header-bookmark-btn::before {
  content: '★';
  color: #f0a500;
  margin-right: 4px;
}

@media (max-width: 768px) {
  .header-bookmark-btn,
  .header-itinerary-btn {
    display: none;
  }
}

.search-box input {
  padding: 8px;
  width: 250px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.search-box button {
  padding: 8px 15px;
  background-color: var(--background-color-dark);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}


.header-icon-row {
  display: none;
  align-items: center;
  gap: 4px;
}

.search-toggle-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 10px 8px;
  line-height: 1;
}

/* ヘッダーのスタイル モバイル版*/
@media (max-width: 768px) {
  header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0px 10px;
  }

  header h1 {
    flex: 1;
    text-align: center;
    margin: 0;
  }

  .header-logo {
    margin: 0 auto;
    height: 50px;
    width: auto;
    display: block;
  }

  .header-icon-row {
    display: flex;
  }

  .menu-toggle {
    display: block;
    margin-left: 0;
  }

  .search-box {
    display: none;
  }

  .search-box.mobile-open {
    display: flex;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    z-index: 10100;
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  }

  .search-box input {
    flex: 1;
  }

  .search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 10099;
  }

  .search-overlay.active {
    display: block;
  }
}

/* ナビゲーションのスタイル */
.global-nav {
  border-bottom:solid 1px #CCCCCC;
  position: relative;
  z-index: 1000;
}

.menu{
  display: flex;
  list-style-type: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1000px;
}

.global-nav li {
  flex: 1;
  text-align: center;
}

.global-nav a,
.nav-item > span {
  display: block;
  padding: 12px 0;
  font-size: var(--font-size-base);
  transition: background-color 0.4s;
  cursor: default;
}

.global-nav a {
  cursor: pointer;
}
.global-nav a:hover {
  font-weight: bold;
}

.nav-item{
  position: relative; /* 子メニューの配置基準にする */
  padding: 0px 0px;
}

.sub-menu {
  display: none;
  position: absolute;
  background-color:var(--background-color-base);
  top: 100%;
  left: 0;
  margin: 0 auto;
  padding:0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nav-item:hover .sub-menu {
  display: block;
}

.sub-menu li{
  list-style:none;
}


/* モバイル向けの対応 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px;
}

.menu-close-item {
  display: none;
}

@media (max-width: 768px) {
  .global-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 10000;
  }

  .global-nav li {
    text-align: left;
  }

  .global-nav a,
  .nav-item > span {
    padding: 8px 15px;
  }

  .menu.open > .nav-item > span {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .menu.open > .nav-item > span::after {
    content: '›';
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 0.2s ease;
    margin-right: 5px;
    transform: rotate(90deg);
  }

  .menu.open > .nav-item.is-open > span::after {
    transform: rotate(-90deg);
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .menu {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .menu.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 56px;
    overflow-y: auto;
    background-color: var(--background-color-base);
    z-index: 10040;
  }

  .menu-close-item {
    display: none;
  }

  .menu.open > .menu-close-item {
    display: flex;
    align-items: center;
    background: #1a1a1a;
    flex: none;
  }

  .menu-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    padding: 18px 20px;
    cursor: pointer;
    text-align: left;
    width: 100%;
  }

  .menu.open > .nav-item {
    background: linear-gradient(135deg, #4a4a4a, #2d2d2d);
    flex: none;
  }

  .menu.open > .nav-item > span,
  .menu.open > .nav-item > a {
    color: #ffffff;
    padding: 18px 20px;
  }

  .nav-item:hover .sub-menu {
    display: none;
  }

  .sub-menu {
    position: static;
    box-shadow: none;
    display: none;
    background-color: #ffffff;
  }

  .nav-item .sub-menu.open {
    display: block;
  }

  .sub-menu li a {
    padding: 18px 20px 18px 36px;
    font-size: 0.9rem;
    color: #555;
    display: block;
  }
}

/* フッター設定 */
.global-footer {
  height:25px;
  background-color:var(--background-color-dark);
  color: #fff;
  text-align: center;
  padding: 5px 0;
  margin-top: auto;
  font-size: 13px;
}

.global-footer p {
  margin: 0;
  background-color:var(--background-color-dark);
  color:var(--color-white);
}


@media (max-width: 768px) {
  .global-footer {
    margin-bottom: 120px;
  }
}





.search-section {
  margin-bottom: 8px;
}

.search-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: var(--font-size-base);
  font-weight: bold;
  background: #f5f5f5;
  border: none;
  border-bottom: 2px solid #e0e0e0;
  padding: 10px 12px;
  margin: 0;
  color: #444;
  cursor: pointer;
  text-align: left;
}

.search-section-title:hover {
  background: #ececec;
}

.search-toggle-icon {
  font-size: 1.4rem;
  color: #888;
  display: inline-block;
  transition: transform 0.2s;
  transform: rotate(90deg);
}

.search-toggle-icon.open {
  transform: rotate(-90deg);
}

.search-section-body {
  display: none;
}

.search-section-body.open {
  display: block;
}

.data-count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px 0;
}

@media (max-width: 768px) {
  .data-count-row {
    margin-top: 12px;
  }
}

.data-count {
  font-size: var(--font-size-sm);
  color: #666;
  margin: 0;
}

.bookmark-back-btn {
  font-size: var(--font-size-sm);
  padding: 4px 10px;
  border: 1px solid #aaa;
  border-radius: 20px;
  color: #555;
  text-decoration: none;
  white-space: nowrap;
}

.bookmark-back-btn:hover {
  background-color: #f5f5f5;
}

.bookmark-list-btn {
  font-size: var(--font-size-sm);
  padding: 4px 10px;
  border: 1px solid #aaa;
  border-radius: 20px;
  background: none;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
}

.bookmark-list-btn:hover {
  background-color: #f5f5f5;
}

.mobile-only {
  display: none;
}

.filter-reset-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px 0;
  text-align: center;
  font-size: var(--font-size-sm);
  color: #888;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.filter-reset-btn:hover {
  background-color: #f5f5f5;
  color: #333;
}

/* メインレイアウト */
.page-wrapper {
  display: flex;
  max-width: 1000px;
  margin: 20px auto;
  gap: 20px;
}

.main-column {
  flex: 1;
  min-width: 0;
}

/* PC用サイドバー */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 2px 2px 4px #bebebe, -2px -2px 4px #ffffff;
}

.sidebar h3 {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0px;
  margin-top: 0px;
}

@media (max-width: 768px) {
  .sidebar h3 {
    padding-bottom: 8px;
    margin-top: 12px;
  }
}


.sidebar_middle {
  padding-top: 15px;
}

.sidebar-type-group-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #888;
  margin: 12px 0 4px;
}

.label_child {
  display: block;
}


@media (max-width: 768px) {
  .sidebar-content label {
    display: block;
    padding: 6px 0;
  }
}

.sidebar-toggle {
  display: none;
}

.sidebar-content {
  display: block;
}

@media (max-width: 768px) {
  .page-wrapper {
    flex-direction: column;
    margin: 0;
  }

  .sidebar {
    position: fixed;
    bottom: 56px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 0;
    border-radius: 0;
  }

  .sidebar-toggle {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: #2d2d2d;
    color: #ffffff;
    border: none;
    border-top: 1px solid #ddd;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
  }

  .sidebar-content {
    display: none;
    max-height: 60vh;
    overflow-y: auto;
    padding: 15px;
  }

  .sidebar-content.open {
    display: block;
  }

  .main-content {
    padding-bottom: 115px;
  }
}

/* モバイルボトムナビ */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 56px;
    background: #fff;
    border-top: 1px solid #ddd;
    z-index: 10050;
    box-sizing: border-box;
  }

  .mobile-bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    text-decoration: none;
    font-size: 0.65rem;
    padding: 6px 0;
    line-height: 1;
    box-sizing: border-box;
  }

  .mobile-bottom-nav-btn svg {
    display: block;
  }

  .mobile-bottom-nav-btn.active {
    color: #2a5f8f;
  }

  main {
    padding-bottom: 56px;
  }

  main.main-content {
    padding-bottom: 0;
  }

  .header-icon-row {
    display: none !important;
  }

}

/* 一覧表示画面 サイドメニュー モバイル表示版*/
@media (max-width: 768px) {
  /* container内の要素の並び順を制御 */
  .container {
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    bottom: 56px;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column-reverse;
  }

  .sidebar-toggle {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background-color: #2d2d2d;
    color: #ffffff;
    border: none;
    border-top: 1px solid #ddd;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
  }

  .sidebar-content {
    display: none;
    overflow-y: auto;
    max-height: 60vh;
    padding: 15px;
  }

  .sidebar-content.open {
    display: block;
  }

  .sidebar.expanded {
    top: 0;
    bottom: 56px;
    z-index: 10010;
  }

  .sidebar.expanded .sidebar-content {
    flex: 1;
    max-height: none;
  }

  .main-content {
    padding-bottom: 115px;
  }
}



/* 一覧表示画面 コンテンツ */
.main-content {
  flex: 1;
}


.list_card {
  border-radius: 4px;
  margin-bottom: 20px;
  padding: 15px;
  display: flex;
  box-shadow: 2px 2px 4px #bebebe, 
             -2px -2px 4px #ffffff;
}

.list_card:hover {
  box-shadow: 5px 5px 10px #bebebe, 
             -5px -5px 10px #ffffff;
}

.list_img {
  display: flex;
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  object-fit: cover;
  background-color: #ddd;
  margin-right: 20px;
  align-items: center;
  justify-content: center;
}

.list_img_none {
  display: flex;
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  margin-right: 20px;
  background-color: #f5f5f5;
  align-items: center;
  justify-content: center;
  color: #d0d0d0;
  font-size: 0.7rem;
  font-style: italic;
  letter-spacing: 0.05em;
}

.list_info h2 {
  margin: 0 0 10px 0;
  font-size: 20px;
}

.area {
  color: #666;
  font-size: 14px;
  line-height:1.2;
}

.details {
  font-size: var(--font-size-base);
}

.description {
  font-size: var(--font-size-base);
  line-height: 1.5;
  margin-top:10px;
}


/* 一覧表示画面 コンテンツ モバイル対応*/
@media (max-width: 768px) {
  .description {
    display: none;
  }
}


/*ページネーションの設定*/
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 20px 0;
  padding: 0;
}

@media (max-width: 768px) {
  .pagination {
    margin: 10px 0 4px;
  }
}

/* ラッパーspanはサイズ・枠線なし */
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* first/prev/next/last の記号を大きく */
.pagination .first a,
.pagination .prev a,
.pagination .next a,
.pagination .last a {
  font-size: 1.2rem;
  line-height: 1;
  padding-bottom: 2px;
}

/* リンク（ページ番号・前後・最初最後） */
.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #ddd;
  text-decoration: none;
  color: #333;
  font-size: var(--font-size-sm);
  transition: all 0.2s;
}

.pagination a:hover {
  background-color: #f0f0f0;
  border-color: #aaa;
}

/* 現在のページ（span.current に直接テキスト） */
.pagination .current {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #2d2d2d;
  color: #fff;
  border: 1px solid #2d2d2d;
  font-size: var(--font-size-sm);
}

/* 省略記号 */
.pagination .gap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  color: #999;
  padding: 0 4px;
}







/* 個別紹介ページ */
.individual_main{
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 2px 4px #bebebe,
             -2px -2px 4px #ffffff;
  border-radius: 4px;
  max-width: 1000px;
  overflow-wrap: break-word;
  padding-bottom:50px;
  margin: 30px auto;
  gap: 20px;
}

/* ========== お気に入りページ ========== */
.favorites-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.create-itinerary-btn {
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.create-itinerary-btn:hover { background: #1b5e20; }

.food-toggle-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: #444;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

/* ========== 旅程作成ページ ========== */
.print-only { display: none; }

@media print {
  .no-print   { display: none !important; }
  .print-only { display: block !important; }
  nav, header, footer { display: none !important; }
}

.itin-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* 設定バー */
.itin-settings {
  background: none;
  padding: 0;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.itin-tripname-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.itin-trip-name {
  font-size: 1.3rem;
  font-weight: bold;
  border: none;
  border-bottom: 2px solid #ccc;
  background: transparent;
  padding: 4px 0;
  flex: 1;
  outline: none;
}
.itin-trip-name:focus { border-bottom-color: #2e7d32; }

.itin-settings-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.itin-meta-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #555;
}

.itin-date-input,
.itin-daycount-input {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.9rem;
}
.itin-daycount-input { width: 56px; }

.itin-action-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.itin-btn {
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
}
.itin-btn-save  { background: #43a047; color: #fff; font-weight: bold; }
.itin-btn-save:hover  { background: #2e7d32; }
.itin-btn-print { background: #fff; color: #555; border: 1px solid #aaa; }
.itin-btn-print:hover { background: #f5f5f5; color: #333; }
.itin-action-bar .itin-btn {
  min-width: 108px;
  text-align: center;
}
.itin-btn-share { background: #fff; color: #555; border: 1px solid #aaa; }
.itin-btn-share:hover { background: #f5f5f5; color: #333; }
.itin-share-wrap {
  position: relative;
  display: inline-block;
}
.itin-share-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  z-index: 200;
  min-width: 160px;
  overflow: hidden;
}
.itin-share-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.85rem;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
}
.itin-share-item:hover { background: #f5f5f5; }
.itin-share-item + .itin-share-item { border-top: 1px solid #eee; }
.itin-btn-reset { background: #fff; color: #c62828; border: 1px solid #c62828; }
.itin-btn-reset:hover { background: #fdecea; }
.itin-btn-new,
.itin-btn-list { background: #fff; color: #555; border: 1px solid #aaa; }
.itin-btn-new:hover,
.itin-btn-list:hover { background: #f5f5f5; color: #333; }

/* ステータスメッセージ */
.itin-status-msg    { font-size: 0.82rem; min-height: 1.2em; }
.itin-status-ok     { color: #2e7d32; }
.itin-status-error  { color: #c62828; }

/* 旅程一覧モーダル */
.itin-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.itin-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.itin-modal-content {
  position: relative;
  background: #fff;
  border-radius: 10px;
  width: min(560px, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.itin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.itin-modal-title { margin: 0; font-size: 1rem; }
.itin-modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #888;
  line-height: 1;
  padding: 2px 6px;
}
.itin-modal-close:hover { color: #333; }
.itin-modal-body {
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.itin-modal-empty { color: #aaa; text-align: center; padding: 24px 0; margin: 0; font-size: 0.9rem; }

.itin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
}
.itin-list-item-current { border-color: #2e7d32; background: #f1f8f1; }
.itin-list-item-info { flex: 1; min-width: 0; }
.itin-list-item-name {
  font-weight: bold;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.itin-current-badge {
  background: #2e7d32;
  color: #fff;
  font-size: 0.68rem;
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: normal;
}
.itin-list-item-meta { font-size: 0.78rem; color: #888; margin-top: 2px; }
.itin-list-item-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* 全体メモ */
.itin-overall-memo {
  margin-bottom: 20px;
}
.itin-section-label {
  display: block;
  font-size: 0.82rem;
  color: #777;
  margin-bottom: 4px;
}
.itin-overall-memo-text {
  width: 100%;
  min-height: 70px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px;
  font-size: 0.9rem;
  resize: vertical;
  box-sizing: border-box;
}

/* 日程セクション */
.itin-content { display: flex; flex-direction: column; gap: 16px; }

.itin-day-section {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}
.itin-unassigned { border-style: dashed; }

.itin-day-header {
  background: #8aafc8;
  padding: 5px 16px;
  text-align: center;
}
.itin-unassigned .itin-day-header { background: #aaa; }
.itin-day-header.itin-day-holiday  { background: #b86060; }
.itin-day-header.itin-day-saturday { background: #6080b8; }

/* flatpickr カレンダー内の祝日・土曜色 */
.flatpickr-day.fp-day-holiday {
  color: #c0392b !important;
  font-weight: bold;
}
.flatpickr-day.fp-day-saturday {
  color: #1a6fc4 !important;
  font-weight: bold;
}
.flatpickr-day.fp-day-holiday.selected,
.flatpickr-day.fp-day-saturday.selected {
  color: #fff !important;
}

.itin-day-title {
  margin: 0;
  font-size: 0.9rem;
  color: #fff;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 10px;
}
.itin-day-date {
  font-size: 0.85rem;
  font-weight: normal;
  opacity: 0.9;
}
.itin-day-date-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.itin-day-date-wrapper:hover .itin-day-date {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.itin-day-date-overlay {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: none;
  pointer-events: none;
}
.itin-day-remove-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0.7;
}
.itin-day-remove-btn:hover { opacity: 1; background: rgba(255,255,255,0.2); }
.itin-day-move-btns {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.itin-day-move-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0.7;
}
.itin-day-move-btn:hover { opacity: 1; background: rgba(255,255,255,0.2); }
.itin-date-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.itin-date-toggle-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #666;
  cursor: pointer;
  user-select: none;
}
.itin-type-filter-toggle {
  font-size: 0.75rem;
  color: #555;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px 4px 0 0;
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
  margin-bottom: 12px;
}
.itin-type-filter-toggle[aria-expanded="true"] {
  margin-bottom: 0;
}
.itin-type-filter-toggle:hover {
  background: #e4e4e4;
}
.itin-type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.8rem;
  color: #555;
  background: #f7f7f7;
  border: 1px solid #ccc;
  border-radius: 0 4px 4px 4px;
  padding: 8px 10px;
  margin-bottom: 12px;
}
.itin-type-filter-item {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.itin-collapse-all-btn {
  font-size: 0.75rem;
  color: #666;
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
}
.itin-collapse-all-btn:hover { background: #f5f5f5; }

.itin-day-collapse-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.85;
}
.itin-day-collapse-btn:hover { opacity: 1; }

.itin-day-collapsed .itin-spot-list { display: none; }

.itin-add-day-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: #fff;
  border: 1px dashed #aaa;
  border-radius: 8px;
  color: #666;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
}
.itin-add-day-btn:hover { background: #f5f5f5; border-color: #888; color: #333; }

/* 2カラムレイアウト */
.itin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}

/* パレット（左） */
.itin-palette-panel {
  position: sticky;
  top: 8px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: #f4f6f4;
  border-radius: 8px;
  padding: 12px;
}
.itin-mobile-overlay-close,
.itin-mobile-overlay-header,
.itin-mobile-add-btn { display: none; }
/* ツールボックス */
.itin-toolbox {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.itin-toolbox-title {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: bold;
  color: #333;
}
.itin-tool-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  box-sizing: border-box;
  cursor: grab;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #444;
  user-select: none;
  transition: box-shadow 0.15s;
}
.itin-tool-item:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.itin-tool-item:active { cursor: grabbing; }
.itin-tool-icon { font-size: 1.1rem; }

/* カスタムカード */
.itin-custom-card { border-left: 3px solid #78909c; }
.itin-custom-badge {
  font-size: 0.7rem;
  color: #78909c;
  font-weight: bold;
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}
.itin-custom-name,
.itin-custom-sub {
  width: 100%;
  border: none;
  border-bottom: 1px dashed #ccc;
  background: transparent;
  font-size: 0.85rem;
  padding: 2px 0;
  outline: none;
  color: #333;
  box-sizing: border-box;
}
.itin-custom-name { font-weight: bold; font-size: 0.9rem; }
.itin-custom-name:focus, .itin-custom-sub:focus {
  border-bottom-color: #4a90d9;
}
.itin-transport-type {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.82rem;
  margin-bottom: 4px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

.itin-panel-divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 14px 0;
}

.itin-palette-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.itin-palette-title  { margin: 0; font-size: 0.95rem; }
.itin-palette-hint   { margin: 0; font-size: 0.75rem; color: #888; }
.itin-palette-list   { display: flex; flex-direction: column; gap: 10px; }

.itin-pref-group { display: flex; flex-direction: column; gap: 5px; }
.itin-pref-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: bold;
  color: #666;
  padding: 4px 8px;
  border-left: 3px solid #b0bec5;
  background: #eef0ee;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  border-radius: 0 4px 4px 0;
}
.itin-pref-label:hover { background: #e4e8e4; color: #444; }
.itin-pref-arrow { font-size: 0.6rem; color: #999; flex-shrink: 0; }
.itin-pref-count { margin-left: auto; font-size: 0.68rem; color: #aaa; font-weight: normal; }
.itin-pref-spots { display: flex; flex-direction: column; gap: 5px; }
.itin-pref-spots.itin-pref-closed { display: none; }

.itin-palette-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 7px 10px;
  cursor: grab;
  transition: box-shadow 0.15s, opacity 0.15s;
}
.itin-palette-card:hover      { box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.itin-palette-card.is-placed  { opacity: 0.5; background: #f5f5f5; }
.itin-palette-card.itin-dragging { opacity: 0.3; }
.itin-palette-card:active     { cursor: grabbing; }

.itin-palette-star {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: none;
  font-size: 0.85rem;
  color: #f5a623;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}
.itin-palette-star:hover { background: #fff8e1; }
.itin-palette-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  color: #888;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.itin-palette-link:hover {
  background: #e8f0fe;
  color: #1a73e8;
}

.itin-palette-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1.5px solid #4a7c59;
  border-radius: 50%;
  background: none;
  color: #4a7c59;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.itin-palette-add-btn:hover { background: #4a7c59; color: #fff; }

.itin-day-selector-popup {
  position: absolute;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 10200;
  overflow: hidden;
  min-width: 130px;
}
.itin-day-selector-popup button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: #333;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}
.itin-day-selector-popup button:last-child { border-bottom: none; }
.itin-day-selector-popup button:hover { background: #f0f7f3; color: #4a7c59; }

.itin-palette-info { flex: 1; min-width: 0; }
.itin-palette-name {
  font-size: 0.85rem;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.itin-palette-loc { font-size: 0.75rem; color: #888; }
.itin-palette-badges {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.itin-palette-badge {
  background: #2e7d32;
  color: #fff;
  font-size: 0.68rem;
  border-radius: 10px;
  padding: 2px 7px;
  white-space: nowrap;
  text-align: center;
}

/* 日程エリア（右） */
.itin-days-panel { min-width: 0; }

.itin-spot-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 80px;
  transition: background 0.15s;
  border-radius: 0 0 6px 6px;
  background: #f9f9f9;
}
.itin-spot-list.itin-drag-over { background: #e8f4ff; outline: 2px dashed #4a90d9; outline-offset: -2px; }

.itin-drop-hint {
  text-align: center;
  color: #ccc;
  font-size: 0.78rem;
  padding: 8px 0 2px;
}

/* 日程内カード */
.itin-placed-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.15s, opacity 0.15s;
}
.itin-placed-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); cursor: grab; }
.itin-placed-card.itin-dragging { opacity: 0.35; }
.itin-placed-card.itin-drop-before { border-top: 3px solid #4a7c59; margin-top: -1px; }
.itin-placed-card.itin-drop-after  { border-bottom: 3px solid #4a7c59; }

.itin-drag-handle {
  color: #ccc;
  font-size: 1.1rem;
  cursor: grab;
  user-select: none;
  padding: 0 6px;
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-right: 1px solid #e8e8e8;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.itin-placed-card:hover .itin-drag-handle {
  color: #888;
  background: #ebebeb;
}
.itin-drag-handle:active { cursor: grabbing; }

/* 時間列 */
.itin-placed-time {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 6px;
  width: 72px;
  min-width: 72px;
  box-sizing: border-box;
  border-right: 1px solid #e8e8e8;
  background: #f8f9ff;
  flex-shrink: 0;
}
.itin-spot-time {
  font-size: 11px;
  border: none;
  padding: 3px 4px;
  color: #333;
  width: 100%;
  text-align: center;
  background: transparent;
  box-sizing: border-box;
  resize: none;
  line-height: 1.4;
}
.itin-spot-time::placeholder { color: #bbb; font-size: 10px; }
.itin-spot-time:focus { outline: none; }

/* アクティビティ列 */
.itin-placed-activity {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 160px;
  min-width: 160px;
  box-sizing: border-box;
  border-right: 1px solid #e8e8e8;
  flex-shrink: 0;
}
.itin-placed-name { font-size: 0.88rem; font-weight: bold; }
.itin-placed-loc  { font-size: 0.73rem; color: #888; }
.itin-placed-link {
  display: inline-block;
  margin-left: 5px;
  font-size: 0.8rem;
  text-decoration: none;
  opacity: 0.6;
  vertical-align: middle;
}
.itin-placed-link:hover { opacity: 1; }

/* メモ列 */
.itin-placed-memo {
  flex: 1;
  padding: 8px 10px;
  min-width: 80px;
  display: flex;
  align-items: stretch;
  border-right: 1px solid #e8e8e8;
  box-sizing: border-box;
}

/* 操作列 */
.itin-placed-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 6px;
  width: 36px;
  min-width: 36px;
  box-sizing: border-box;
  flex-shrink: 0;
  border-left: 1px solid #e8e8e8;
}
.itin-remove-btn {
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  font-size: 0.75rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.itin-remove-btn:hover { color: #e53935; }

/* スポット間の移動線 */
.itin-move-sep {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2px 0;
  pointer-events: none;
  user-select: none;
}
.itin-move-vline {
  width: 2px;
  height: 12px;
  background: repeating-linear-gradient(
    to bottom,
    #aaa 0, #aaa 4px,
    transparent 4px, transparent 8px
  );
}
.itin-move-label {
  font-size: 11px;
  color: #666;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 2px 10px;
  margin: 2px 0;
}

.itin-spot-memo {
  width: 100%;
  min-height: 52px;
  border: none;
  padding: 4px 6px;
  font-size: 0.82rem;
  resize: none;
  box-sizing: border-box;
  background: transparent;
  align-self: stretch;
}
.itin-spot-memo:focus { outline: none; }


/* 印刷用 */
.itin-print-header { margin-bottom: 16px; }
.itin-print-header h1 { font-size: 1.4rem; margin: 0 0 4px; }
.itin-print-header p  { color: #555; margin: 0; font-size: 0.9rem; }

@media print {
  .itin-layout       { display: block; }
  .itin-palette-panel { display: none; }
  .itin-placed-card  { break-inside: avoid; cursor: default; }
  .itin-day-header   { background: #4a90d9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .itin-day-section  { break-inside: avoid; margin-bottom: 16px; }
  .itin-spot-memo    { border: none; padding: 0; min-height: 0; resize: none; }
  .itin-overall-memo-text { border: none; resize: none; }
  .itin-wrapper      { padding: 0; }
}


/* モバイル */
@media (max-width: 768px) {
  .itin-layout {
    grid-template-columns: 1fr;
  }
  .itin-action-bar .itin-btn {
    min-width: unset;
    padding: 6px 10px;
  }
  .itin-overall-memo-text {
    min-height: 36px;
  }

  /* モバイルはタップ選択なのでグラブカーソル不要 */
  .itin-palette-card,
  .itin-tool-item { cursor: pointer; }

  /* パレット: 通常時はボタンのみ表示 */
  .itin-palette-panel {
    position: static;
    background: none;
    padding: 0;
  }
  .itin-palette-panel > *:not(.itin-mobile-add-btn) { display: none; }
  .itin-mobile-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px;
    background: #f4f6f4;
    border: 1px dashed #8aafc8;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2c5f8a;
    font-weight: bold;
    cursor: pointer;
  }

  /* パレットオーバーレイ（展開時） */
  body:has(.mobile-overlay-open) { overflow: hidden; }
  .itin-palette-panel.mobile-overlay-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 6000;
    background: #fff;
    padding: 12px;
    overflow-y: auto;
  }
  .itin-palette-panel.mobile-overlay-open > * { display: block; }
  .itin-palette-panel.mobile-overlay-open .itin-mobile-add-btn { display: none; }
  .itin-mobile-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
  }
  .itin-mobile-overlay-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
  }
  .itin-drag-handle  { display: none; }
  .itin-placed-actions { flex-direction: row; }

  /* メモを場所の下に表示 */
  .itin-placed-card {
    flex-wrap: wrap;
  }
  .itin-placed-time {
    order: 1;
    flex-shrink: 0;
  }
  .itin-placed-activity {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    border-right: none;
  }
  .itin-placed-actions {
    order: 3;
    flex-shrink: 0;
  }
  .itin-placed-memo {
    order: 4;
    flex: 0 0 100%;
    min-width: 0;
    border-right: none;
    border-top: 1px solid #e8e8e8;
  }
}



/* ========== ヘッダーユーザーメニュー ========== */
.header-login-btn {
  font-size: var(--font-size-sm);
  color: #555;
  background: none;
  border: 1px solid #aaa;
  border-radius: 20px;
  padding: 3px 0;
  width: 150px;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  box-sizing: border-box;
  vertical-align: middle;
  transition: background 0.15s, color 0.15s;
}
.header-login-btn:hover { background-color: #f5f5f5; color: #333; }
.header-user-menu { position: relative; }
.header-user-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid #aaa;
  border-radius: 20px;
  color: #555;
  padding: 3px 0;
  width: 150px;
  font-size: var(--font-size-sm);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  box-sizing: border-box;
  vertical-align: middle;
}
.header-user-btn:hover { background: #f5f5f5; }
.header-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  min-width: 160px;
  z-index: 1100;
  overflow: hidden;
}
.header-user-dropdown a,
.header-user-dropdown button,
.header-logout-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #333;
  text-align: left;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
}
.header-user-dropdown a:hover,
.header-logout-btn:hover { background: #f5f5f5; }
.header-logout-btn { color: #c0392b; }

/* ========== モバイルナビ内アカウントメニュー ========== */
.nav-account-mobile {
  display: none;
}
@media (max-width: 768px) {
  /* ヘッダーのユーザーボタン/ログインボタンをモバイルでは非表示 */
  .header-user-menu,
  .header-login-btn {
    display: none;
  }

  /* ハンバーガーメニュー内にアカウント項目を表示 */
  .nav-account-mobile {
    display: block;
    border-top: 1px solid #ddd;
    margin-top: 8px;
    padding-top: 8px;
  }
  .nav-user-info {
    font-size: 0.85rem;
    color: #555;
    padding: 10px 20px;
  }
  .nav-account-link {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
  }
  .nav-account-link:hover { background: #f5f5f5; }
  .nav-logout-btn {
    display: block;
    width: 100%;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: #c0392b;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
  }
  .nav-logout-btn:hover { background: #fff5f5; }
}

/* ========== フラッシュメッセージ ========== */
.flash {
  padding: 12px 20px;
  font-size: 0.88rem;
  text-align: center;
  border-bottom: 1px solid transparent;
}
.flash-notice {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.flash-alert {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
