:root {
  --bg-page: #ffffff;
  --bg-subtle: #f7f9f9;
  --bg-soft: #f2f5f4;
  --text-main: #222222;
  --text-body: #333635;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border-hairline: #e6e8e8;
  --border-strong: #d1d5db;
  --note-green: #2cb696;
  --note-green-hover: #239b7e;
  --note-green-tint: #eaf8f4;
  --suki-red: #e11d48;
  --suki-tint: #fff1f2;

  /* Waypoint semantic colors */
  --wp-spot: #2cb696;
  --wp-food: #d97706;
  --wp-flight: #2563eb;
  --wp-train: #0d9488;
  --wp-stay: #57534e;
  --wp-note: #222222;

  --font-sans: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  --font-serif: "Noto Serif JP", Georgia, serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.hidden {
  display: none !important;
}

/* --- Sticky Header (note.com style) --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: 58px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-hairline);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #222222;
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark.small {
  width: 22px;
  height: 22px;
  font-size: 12px;
}

.header-breadcrumb {
  color: var(--text-muted);
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-right button {
  white-space: nowrap;
  flex-shrink: 0;
}

.leaflet-tile-pane {
  filter: saturate(0.38) contrast(0.96) brightness(1.03);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  width: 210px;
  transition: border-color 0.15s, width 0.2s;
}

.search-box:focus-within {
  border-color: #222222;
  background: #ffffff;
  width: 240px;
}

.search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text-main);
  width: 100%;
}

/* --- Buttons --- */
button, .file-label {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #222222;
  color: #ffffff;
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
}

.btn-primary:hover {
  background: #000000;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  font-weight: 500;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
}

.btn-outline:hover {
  border-color: var(--text-main);
  background: var(--bg-subtle);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
}

.btn-ghost:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.auth-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
}

.auth-dot.unlocked {
  background: var(--note-green);
  box-shadow: 0 0 0 3px var(--note-green-tint);
}

/* --- Creator Profile Header (note.com Home) --- */
.creator-hero {
  border-bottom: 1px solid var(--border-hairline);
  background: #ffffff;
}

.creator-banner {
  height: 150px;
  background: linear-gradient(120deg, #eaf8f4 0%, #f7f9f9 55%, #fef3c7 100%);
  border-bottom: 1px solid var(--border-hairline);
}

.creator-profile-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px 26px;
}

.creator-top-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -38px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 16px;
}

.creator-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.creator-stats-pills {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.creator-stat {
  display: flex;
  flex-direction: column;
}

.creator-stat strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.creator-stat span {
  font-size: 12px;
  color: var(--text-muted);
}

.creator-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.creator-handle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.creator-bio {
  font-size: 14.5px;
  color: var(--text-body);
  max-width: 660px;
  line-height: 1.65;
}

.creator-tabs {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 28px;
}

.creator-tab {
  padding: 12px 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  background: none;
  border-radius: 0;
}

.creator-tab.active {
  color: var(--text-main);
  border-bottom-color: var(--text-main);
}

/* --- Home Feed Container --- */
.home-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}

.section-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tag-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-chip {
  font-size: 12.5px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: pointer;
}

.tag-chip.active, .tag-chip:hover {
  background: #222222;
  border-color: #222222;
  color: #ffffff;
  font-weight: 600;
}

/* --- Infinite Journals Timeline (Collapsed by Default: Thumbnail + Title) --- */
.journals-timeline {
  position: relative;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.journals-timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 9px;
  width: 2px;
  background: var(--border-hairline);
}

.timeline-trip-node {
  position: relative;
}

.timeline-trip-dot {
  position: absolute;
  left: -24px;
  top: 28px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid #222222;
  z-index: 2;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.timeline-trip-node.expanded .timeline-trip-dot,
.timeline-trip-node:hover .timeline-trip-dot {
  background: #222222;
  transform: scale(1.15);
}

.timeline-trip-card {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.timeline-trip-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.timeline-trip-collapsed-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}

.timeline-trip-thumb {
  width: 72px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
  flex-shrink: 0;
  border: 1px solid var(--border-hairline);
}

.timeline-trip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.timeline-trip-title {
  flex: 1;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  min-width: 0;
}

.timeline-trip-chevron {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}

.timeline-trip-expanded-body {
  padding: 4px 18px 18px;
  border-top: 1px solid var(--border-hairline);
  background: #ffffff;
}

.timeline-trip-photo-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
}

.timeline-trip-photo-strip img {
  height: 92px;
  width: 132px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  border: 1px solid var(--border-hairline);
}

.timeline-trip-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.journals-infinite-sentinel {
  height: 24px;
}

.trip-card-dates {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 12px 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trip-card-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.55;
}

/* Mini Route Strip inside Expanded Timeline Card */
.trip-mini-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--text-body);
}

.mini-crumb-arrow {
  color: var(--text-light);
}

.trip-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.trip-card-metrics {
  display: flex;
  gap: 14px;
  font-weight: 500;
}

/* --- Global Footprint Atlas Tab --- */
.atlas-map-wrap {
  height: 520px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  overflow: hidden;
  margin-bottom: 24px;
}

/* --- Single Trip View (Breadtrip Dashboard + Map + Timeline) --- */
.trip-detail-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

.trip-hero-card {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #ffffff;
  margin-bottom: 28px;
}

.trip-hero-visual {
  position: relative;
  height: 340px;
  background: #eef2f2;
  overflow: hidden;
}

.trip-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trip-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18, 24, 24, 0.78) 0%, rgba(18, 24, 24, 0.2) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  color: #ffffff;
}

.trip-hero-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.trip-hero-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.trip-hero-subtitle {
  font-size: 15.5px;
  opacity: 0.92;
  max-width: 780px;
}

/* Breadtrip 4-Column Stats Dashboard */
.trip-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border-hairline);
  background: #ffffff;
}

.trip-stat-cell {
  padding: 18px 24px;
  border-right: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
}

.trip-stat-cell:last-child {
  border-right: none;
}

.stat-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.stat-value {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-main);
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.trip-prologue-bar {
  padding: 22px 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background: var(--bg-subtle);
  flex-wrap: wrap;
}

.trip-prologue-text {
  font-family: var(--font-serif);
  font-size: 15.5px;
  color: var(--text-body);
  max-width: 760px;
  line-height: 1.85;
}

.trip-prologue-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- Interactive Map Trajectory & Playback Section --- */
.trajectory-panel {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #ffffff;
  margin-bottom: 36px;
}

.playback-toolbar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #ffffff;
}

.playback-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-play-journey {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text-main);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
}

.btn-play-journey.playing {
  background: var(--note-green);
}

.playback-step-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-hairline);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.playback-step-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.playback-progress-wrap {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.playback-scrubber {
  flex: 1;
  accent-color: var(--note-green);
  cursor: pointer;
}

.playback-status-text {
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trip-map-stage {
  position: relative;
  height: 410px;
  width: 100%;
  background: #edf2f2;
}

#trip-leaflet-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Floating Story Callout during Journey Playback */
.map-playback-card {
  position: absolute;
  bottom: 18px;
  left: 18px;
  z-index: 500;
  width: 340px;
  max-width: calc(100% - 36px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  display: flex;
  gap: 12px;
  align-items: center;
}

.map-playback-thumb {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-subtle);
}

.map-playback-info {
  min-width: 0;
  flex: 1;
}

.map-playback-step {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--note-green);
  letter-spacing: 0.04em;
}

.map-playback-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-playback-place {
  font-size: 12px;
  color: var(--text-muted);
}

/* Custom Leaflet Numbered Pin */
.mugi-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--text-main);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  border: 2.5px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}

.mugi-map-pin.active {
  transform: scale(1.28);
  background: var(--note-green);
  z-index: 999 !important;
}

.mugi-map-pin.type-food { background: var(--wp-food); }
.mugi-map-pin.type-flight { background: var(--wp-flight); }
.mugi-map-pin.type-train { background: var(--wp-train); }
.mugi-map-pin.type-stay { background: var(--wp-stay); }
.mugi-map-pin.type-spot { background: var(--wp-spot); }

/* --- Vertical Chronological "Breadcrumbs" Timeline --- */
.timeline-wrapper {
  max-width: 780px;
  margin: 0 auto;
}

.day-section {
  margin-bottom: 44px;
}

.day-header-banner {
  position: sticky;
  top: 58px;
  z-index: 400;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-hairline);
  border-left: 4px solid var(--note-green);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.day-badge {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--note-green);
  margin-right: 10px;
}

.day-title-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.day-summary-metrics {
  font-size: 12.5px;
  color: var(--text-muted);
}

.timeline-spine {
  position: relative;
  padding-left: 44px;
}

.timeline-spine::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border-hairline);
}

.timeline-interval-pill {
  position: relative;
  margin: -8px 0 16px 0;
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px dashed var(--border-hairline);
}

.waypoint-node {
  position: relative;
  margin-bottom: 26px;
}

.waypoint-marker {
  position: absolute;
  left: -44px;
  top: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--wp-spot);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  z-index: 2;
  box-shadow: 0 0 0 4px #ffffff;
}

.waypoint-node.type-food .waypoint-marker { border-color: var(--wp-food); }
.waypoint-node.type-flight .waypoint-marker { border-color: var(--wp-flight); }
.waypoint-node.type-train .waypoint-marker { border-color: var(--wp-train); }
.waypoint-node.type-stay .waypoint-marker { border-color: var(--wp-stay); }

.waypoint-card {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 22px 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.waypoint-card.highlighted {
  border-color: var(--note-green);
  box-shadow: 0 0 0 3px var(--note-green-tint);
}

.wp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.wp-time-tag {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.wp-type-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.wp-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Type-specific structured callout bar (Flight / Bakery / Stay) */
.wp-structured-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-body);
}

.wp-content-body {
  font-size: 15.5px;
  color: var(--text-body);
  line-height: 1.85;
  margin-bottom: 16px;
  white-space: pre-line;
}

/* Photo Gallery & EXIF Strip */
.wp-photos-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.wp-photo-figure {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
}

.wp-photo-figure img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

.wp-photo-caption-bar {
  padding: 10px 14px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.wp-photo-caption {
  color: var(--text-body);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wp-photo-time {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.wp-exif-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: 4px;
}

.wp-card-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.wp-geo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  cursor: pointer;
}

.wp-geo-chip:hover {
  color: var(--note-green);
}

.wp-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* note.com Suki (Heart) Button */
.btn-suki {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: #ffffff;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.btn-suki:hover, .btn-suki.liked {
  border-color: #fecdd3;
  background: var(--suki-tint);
  color: var(--suki-red);
}

/* --- Modals & Forms --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.modal-card.modal-sm { max-width: 420px; }
.modal-card.modal-lg { max-width: 740px; }

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  background: none;
}

.modal-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-hint {
  font-size: 13.5px;
  color: var(--text-muted);
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 140px;
}

.form-group.flex-2 { flex: 2; }
.form-group.flex-1 { flex: 1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-body);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--text-main);
  background: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--note-green);
}

.upload-inline-row {
  display: flex;
  gap: 10px;
}

.upload-inline-row input {
  flex: 1;
}

.exif-dropzone {
  border: 1.5px dashed var(--note-green);
  background: var(--note-green-tint);
  border-radius: var(--radius-md);
  padding: 16px;
}

.dropzone-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.dropzone-icon {
  font-size: 26px;
}

.dropzone-content p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.exif-detected-banner {
  margin-top: 12px;
  padding: 8px 12px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--note-green);
  font-size: 12.5px;
  color: #115e59;
}

.uploaded-previews {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.uploaded-preview-item {
  position: relative;
  width: 88px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.uploaded-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uploaded-preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.location-picker-box {
  padding: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.location-search-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.location-search-row input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.geo-results {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  max-height: 160px;
  overflow-y: auto;
}

.geo-result-item {
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-hairline);
  cursor: pointer;
}

.geo-result-item:hover {
  background: var(--note-green-tint);
}

.meta-subbox {
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
}

.form-error {
  color: var(--suki-red);
  font-size: 13px;
  font-weight: 500;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-hairline);
}

/* --- Footer --- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-hairline);
  padding: 28px 24px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 13px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 10px;
    gap: 6px;
  }
  .brand-text {
    font-size: 16px;
  }
  .header-right {
    gap: 6px;
  }
  .header-breadcrumb,
  .search-box,
  .site-header #btn-comment-mode,
  .site-header #btn-comments-drawer,
  .site-header #btn-new-trip {
    display: none !important;
  }
  #btn-auth-toggle {
    padding: 5px 8px;
    font-size: 11px;
    white-space: nowrap;
  }
  #btn-quick-log {
    padding: 6px 10px;
    font-size: 11.5px;
    white-space: nowrap;
  }
  .trips-grid {
    grid-template-columns: 1fr;
  }
  .trip-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .trip-hero-visual {
    height: 280px;
  }
  .trip-hero-overlay {
    padding: 18px;
  }
  .trip-hero-title {
    font-size: 21px;
  }
  .trip-hero-subtitle {
    font-size: 13.5px;
  }
  .trip-detail-page {
    padding: 16px 12px 96px;
  }
  .home-container {
    padding: 24px 14px 96px;
  }
}

/* --- Design Iteration: Comment Mode & Element Inspector --- */
body.comment-mode-active {
  cursor: crosshair !important;
  -webkit-user-select: none;
  user-select: none;
}

body.comment-mode-active #design-comment-popover,
body.comment-mode-active #design-comment-popover * {
  -webkit-user-select: text;
  user-select: text;
}

body.comment-mode-active a,
body.comment-mode-active button:not(#btn-comment-mode):not(#btn-dock-comment-mode):not(#btn-exit-comment-mode):not(#btn-close-popover):not(#btn-cancel-popover) {
  cursor: crosshair !important;
}

#btn-comment-mode.active,
#btn-dock-comment-mode.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

.author-floating-dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(10px);
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  display: none;
  align-items: center;
  gap: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

@media (max-width: 768px) {
  .author-floating-dock:not(.hidden) {
    display: flex;
  }
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.dock-btn:active,
.dock-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.comment-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--note-green-tint);
  color: #155e4d;
  font-size: 11px;
  font-weight: 700;
}

.design-mode-banner {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1400;
  background: #2563eb;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35);
  max-width: calc(100vw - 24px);
  white-space: nowrap;
}

.btn-exit-banner {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.design-hover-box {
  position: fixed;
  pointer-events: none;
  z-index: 1300;
  border: 2px solid #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 4px;
  transition: all 0.05s ease-out;
}

.design-hover-label {
  position: absolute;
  top: -24px;
  left: -2px;
  background: #2563eb;
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.design-pins-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  pointer-events: none;
  z-index: 1100;
}

.design-pin-marker {
  position: absolute;
  pointer-events: auto;
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 3px;
  background: #e11d48;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
  cursor: pointer;
  transform: translate(-50%, -100%);
  transition: transform 0.15s ease;
}

.design-pin-marker:hover {
  transform: translate(-50%, -100%) scale(1.18);
  z-index: 1150;
}

.design-comment-popover {
  position: fixed;
  z-index: 1500;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  padding: 14px 16px;
}

@media (max-width: 768px) {
  .design-comment-popover {
    top: 66px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
  }
}

.popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.popover-target-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 600;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 2px 7px;
  border-radius: 4px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popover-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

#form-design-comment textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  margin-bottom: 10px;
  resize: vertical;
}

#form-design-comment textarea:focus {
  border-color: #2563eb;
}

.popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.design-comments-drawer {
  position: fixed;
  top: 58px;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 100vw;
  background: #ffffff;
  border-left: 1px solid var(--border-hairline);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
  z-index: 1250;
  display: flex;
  flex-direction: column;
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.drawer-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.drawer-comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-comment-card {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: #ffffff;
  transition: border-color 0.15s;
}

.drawer-comment-card.resolved {
  opacity: 0.65;
  background: var(--bg-subtle);
}

.drawer-comment-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}

.drawer-pin-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e11d48;
  color: #ffffff;
  font-weight: 700;
  font-size: 11px;
}

.drawer-comment-card.resolved .drawer-pin-num {
  background: var(--note-green);
}

.drawer-comment-selector {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #1d4ed8;
  background: #eff6ff;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
  word-break: break-all;
}

.drawer-comment-body {
  font-size: 13.5px;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.5;
}

.drawer-comment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

