/**
 * Paris Museum Pass & Route Optimizer CSS
 * Version: 3.1.0 (Header Removed, Subtle Collapsible Notice Below Submit Button, Line-Height 1.7)
 */

:root {
  --vp-primary: #2B4C7E;
  --vp-primary-hover: #1f375c;
  --vp-accent-rose: #8E354A;
  --vp-bg-soft: #F9F8F6;
  --vp-card-bg: #FFFFFF;
  --vp-border: #DDD6CE;
  --vp-text-main: #222222;
  --vp-text-sub: #5A5D62;
}

#paris-planner-app,
#paris-planner-app * {
  box-sizing: border-box;
}

#paris-planner-app {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: var(--vp-text-main);
  background: var(--vp-bg-soft);
  border: 1px solid var(--vp-border);
  border-radius: 12px;
  margin: 16px 0;
  max-width: 100%;
  overflow-x: clip;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.vp-body {
  padding: 18px 20px;
}

/* 条件入力フォーム */
.vp-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  align-items: stretch;
}

.vp-field {
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--vp-border);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.vp-field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--vp-primary);
}

.vp-input-control {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 16px !important;
  border: 1px solid var(--vp-border);
  border-radius: 6px;
  background: #fff;
  color: var(--vp-text-main);
}

.vp-style-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vp-safety-label {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
  color: var(--vp-text-main) !important;
  cursor: pointer;
  margin-bottom: 2px !important;
  line-height: 1.4;
}

.vp-safety-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--vp-primary);
  flex-shrink: 0;
}

.vp-purchase-help {
  font-size: 0.74rem;
  color: var(--vp-text-sub);
  line-height: 1.4;
  background: #F8FAFC;
  padding: 5px 8px;
  border-radius: 4px;
  border-left: 3px solid var(--vp-primary);
}

/* 上部追従（Sticky）クイック検索＆フィルターバー */
.vp-sticky-filter-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 248, 246, 0.97);
  backdrop-filter: blur(6px);
  padding: 10px 0 8px 0;
  border-bottom: 1px solid var(--vp-border);
  margin-bottom: 14px;
}

.vp-search-row {
  position: relative;
  margin-bottom: 8px;
}

.vp-search-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 40px 10px 14px;
  font-size: 16px !important;
  border: 1px solid var(--vp-border);
  border-radius: 8px;
  background: #fff;
  color: var(--vp-text-main);
}

.vp-search-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: #eee;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  color: #444;
}

.vp-tabs-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.vp-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.vp-tab-btn {
  background: #fff;
  border: 1px solid var(--vp-border);
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.83rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  color: var(--vp-text-main);
  flex-shrink: 0;
  transition: 0.15s;
}

.vp-tab-btn.active {
  background: var(--vp-primary);
  color: #fff;
  border-color: var(--vp-primary);
}

.vp-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.vp-counter-badge {
  font-size: 0.88rem;
  background: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--vp-border);
}

.vp-counter-badge.limit-near {
  color: var(--vp-accent-rose);
  border-color: var(--vp-accent-rose);
  font-weight: 700;
}

.vp-quick-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vp-mini-btn {
  background: #fff;
  border: 1px solid var(--vp-border);
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: var(--vp-text-main);
}

.vp-form-warning {
  background: #FFF5F5;
  border: 2px solid #C53030;
  color: #9B2C2C;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* 施設カード一覧 */
.vp-spots-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.vp-spot-accordion {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--vp-card-bg);
  border: 1px solid var(--vp-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.vp-spot-accordion.expanded {
  justify-content: flex-start;
  align-self: start;
}

.vp-spot-accordion:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.vp-spot-accordion.checked {
  border: 2px solid var(--vp-primary);
  background: #F4F7FC;
}

.vp-spot-accordion.closed-facility {
  opacity: 0.65;
  background: #EFEFEF;
}

.vp-acc-header {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 10px;
  min-height: 108px;
  height: 100%;
}

.vp-spot-accordion.expanded .vp-acc-header {
  min-height: 68px;
  height: auto;
}

.vp-cb-touch-area {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0 -4px 0 -4px;
}

.vp-spot-cb {
  width: 22px;
  height: 22px;
  accent-color: var(--vp-primary);
  cursor: pointer;
}

.vp-spot-mini-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #EFECE6;
  border: 1px solid rgba(0,0,0,0.08);
  cursor: pointer;
}

.vp-spot-accordion.expanded .vp-spot-mini-thumb {
  display: none;
}

.vp-acc-title-area {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  padding: 2px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.vp-spot-name {
  font-size: 0.93rem;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.vp-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.vp-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  line-height: 1.3;
}

.vp-b-area  { background: #EEF2F6; color: #334155; }
.vp-b-pass  { background: #DBEAFE; color: #1E40AF; }
.vp-b-extra { background: #F3F4F6; color: #374151; }
.vp-b-req   { background: #FEE2E2; color: #991B1B; }
.vp-b-fast  { background: #FEF3C7; color: #92400E; }
.vp-b-free  { background: #D1FAE5; color: #065F46; }

.vp-spot-oneline {
  font-size: 0.75rem;
  color: var(--vp-text-sub);
  line-height: 1.35;
}

.vp-acc-toggle-btn {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  min-height: 44px;
  min-width: 64px;
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--vp-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.vp-acc-body {
  display: none;
  padding: 12px 14px 14px 14px;
  border-top: 1px dashed var(--vp-border);
  background: #fff;
}

.vp-spot-accordion.expanded .vp-acc-body {
  display: block;
}

.vp-acc-large-media {
  width: 100%;
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  background: #F3EFEA;
  border: 1px solid rgba(0,0,0,0.06);
}

.vp-spot-large-photo {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.vp-acc-details {
  width: 100%;
}

.vp-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 10px;
  font-size: 0.8rem;
  background: #F8FAFC;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.vp-detail-res-box {
  font-size: 0.8rem;
  color: #1E293B;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.vp-spot-note {
  font-size: 0.82rem;
  color: var(--vp-text-main);
  line-height: 1.5;
}

.vp-acc-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vp-official-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: var(--vp-primary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 8px;
  text-align: center;
}

.vp-secondary-link-btn {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #334155;
}

.vp-load-more-wrap {
  margin: 16px 0;
}

.vp-load-more-btn {
  width: 100%;
  min-height: 48px;
  background: #fff;
  border: 2px solid var(--vp-primary);
  color: var(--vp-primary);
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}

.vp-submit-btn {
  display: block;
  width: 100%;
  min-height: 54px;
  background: var(--vp-accent-rose);
  color: #fff;
  border: none;
  padding: 14px 16px;
  font-size: 1.02rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  margin-top: 18px;
  box-shadow: 0 4px 12px rgba(142,53,74,0.25);
}

/* =========================================================
   作成ボタン直下：開閉式の注意事項・免責事項（控えめなデザイン・行間1.7）
   ========================================================= */
.vp-notice-accordion-wrap {
  margin-top: 14px;
  scroll-margin-top: 16px;
}

.vp-notice-details {
  background: #FAFAF9;
  border: 1px solid #E2DDD5;
  border-radius: 8px;
  overflow: hidden;
}

.vp-notice-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.15s;
}

.vp-notice-summary::-webkit-details-marker {
  display: none;
}

.vp-notice-summary:hover {
  background: #F3F2EE;
}

.vp-notice-summary:focus-visible {
  outline: 2px solid var(--vp-primary);
  outline-offset: -2px;
}

.vp-notice-chevron {
  font-size: 0.75rem;
  color: #64748B;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.vp-notice-details[open] .vp-notice-chevron {
  transform: rotate(180deg);
}

.vp-notice-body {
  padding: 14px 16px 16px 16px;
  border-top: 1px solid #E7E3DC;
  background: #FFFFFF;
}

.vp-notice-block {
  margin-bottom: 14px;
}

.vp-notice-block:last-child {
  margin-bottom: 0;
}

.vp-notice-subheading {
  margin: 0 0 4px 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
  line-height: 1.4;
}

.vp-notice-block p {
  margin: 0;
  font-size: 0.81rem;
  color: #4B5563;
  line-height: 1.72;
}

/* 結果エリア */
.vp-result-area {
  display: none;
  margin-top: 22px;
  border-top: 2px solid var(--vp-border);
  padding-top: 20px;
}

.vp-stale-notice {
  background: #FFFBEB;
  border: 2px solid #D97706;
  color: #92400E;
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vp-stale-text {
  font-size: 0.88rem;
  line-height: 1.5;
  flex: 1;
  min-width: 220px;
}

.vp-stale-recalc-btn {
  min-height: 44px;
  padding: 10px 18px;
  background: #D97706;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

#vp-result-content-wrap.is-stale {
  opacity: 0.42;
  filter: grayscale(60%);
  pointer-events: none;
  user-select: none;
}

@media print {
  .vp-result-area.stale-no-print #vp-result-content-wrap {
    display: none !important;
  }
}

.vp-unplaced-box {
  background: #FFF5F5;
  border: 2px solid #FEB2B2;
  color: #9B2C2C;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  margin-bottom: 14px;
  line-height: 1.5;
}

.vp-roi-card {
  background: #fff;
  border: 2px solid var(--vp-primary);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.vp-roi-badge {
  display: inline-block;
  background: var(--vp-primary);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.vp-roi-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--vp-primary);
  margin-bottom: 6px;
}

.vp-roi-desc {
  font-size: 0.86rem;
  margin: 0;
  line-height: 1.55;
}

.vp-roi-basis-box {
  margin-top: 10px;
  padding: 8px 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 0.76rem;
  color: #334155;
  line-height: 1.5;
}

.vp-cushion-box {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 22px;
}

.vp-result-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.vp-map-sticky {
  position: sticky;
  top: 80px;
}

#vp-leaflet-map {
  width: 100%;
  height: 480px;
  border-radius: 10px;
  border: 1px solid var(--vp-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  z-index: 1;
}

.vp-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.78rem;
}

.vp-map-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.78rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  border: 2px solid #fff;
}

.vp-day-card {
  background: #fff;
  border: 1px solid var(--vp-border);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.vp-day-header {
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.92rem;
}

.vp-holiday-alert {
  background: #FFF5F5;
  color: #9B2C2C;
  padding: 10px 12px;
  font-size: 0.82rem;
  border-bottom: 1px solid #FED7D7;
  line-height: 1.45;
}

.vp-day-body {
  padding: 12px;
}

.vp-tl-spot {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.vp-tl-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 2px;
}

.vp-tl-content {
  flex: 1;
  min-width: 0;
  background: #F9F9F9;
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--vp-primary);
}

.vp-tl-time-title {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.vp-tl-time-breakdown {
  font-size: 0.8rem;
  background: #EFF6FF;
  color: #1E3A8A;
  padding: 5px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.vp-inline-tag {
  display: inline-block;
  background: #E2E8F0;
  color: #1E293B;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.74rem;
}

.vp-tl-meta {
  font-size: 0.78rem;
  color: var(--vp-text-sub);
  line-height: 1.45;
}

.vp-tl-transit {
  background: #F1F5F9;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #334155;
  margin: 6px 0 10px 36px;
  border-left: 3px solid #94A3B8;
}

.vp-tl-lunch {
  background: #FEF2F2;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #991B1B;
  margin: 6px 0 10px 36px;
  border-left: 3px solid #EF4444;
}

.vp-todo-box {
  background: #fff;
  border: 1px solid var(--vp-border);
  border-radius: 8px;
  padding: 16px;
  margin-top: 22px;
}

.vp-todo-title {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--vp-primary);
  font-size: 1.02rem;
}

.vp-todo-reschedule-alert {
  background: #FFFBEB;
  border: 1px solid #F59E0B;
  color: #92400E;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 12px;
}

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

.vp-todo-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--vp-border);
  flex-wrap: wrap;
  gap: 10px;
}

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

.vp-todo-info {
  flex: 1;
  min-width: 220px;
}

.vp-todo-day-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  background: #EEF2F6;
  color: var(--vp-primary);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.vp-todo-spot-name {
  display: block;
  color: var(--vp-primary);
  font-size: 0.96rem;
  margin-bottom: 3px;
}

.vp-todo-slot-target {
  font-size: 0.82rem;
  color: #1E3A8A;
  background: #EFF6FF;
  padding: 5px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.vp-todo-desc {
  font-size: 0.8rem;
  color: var(--vp-text-main);
  line-height: 1.45;
}

.vp-todo-link-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.vp-todo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--vp-primary);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.vp-todo-sublink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #334155 !important;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  .vp-result-columns {
    grid-template-columns: 1fr;
  }
  .vp-map-sticky {
    position: static;
  }
  #vp-leaflet-map {
    height: 360px;
  }
}

@media (max-width: 768px) {
  .vp-body {
    padding: 12px 10px;
  }
  .vp-settings-grid {
    grid-template-columns: 1fr;
  }
  .vp-spots-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .vp-acc-header {
    padding: 8px 10px;
    gap: 8px;
    min-height: 74px;
    height: auto;
  }
  .vp-spot-mini-thumb {
    width: 54px;
    height: 54px;
    border-radius: 6px;
  }
  .vp-spot-large-photo {
    height: 175px;
  }
  .vp-detail-grid {
    grid-template-columns: 1fr;
  }
  .vp-notice-summary {
    padding: 10px 12px;
    font-size: 0.81rem;
  }
  .vp-notice-body {
    padding: 12px;
  }
  .vp-stale-recalc-btn,
  .vp-todo-link-group,
  .vp-todo-link,
  .vp-todo-sublink {
    width: 100%;
  }
  .vp-tl-transit,
  .vp-tl-lunch {
    margin-left: 14px;
  }
}