.atlas-back { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: .875rem; font-weight: 750; text-decoration: none; color: var(--muted); }
.atlas-back .icon { width: 17px; }
.trip-header { display: grid; grid-template-columns: 1fr 210px; align-items: center; column-gap: 20px; position: relative; padding-top: 30px; }
.trip-intro h1 { font-size: clamp(2.3rem, 4.7vw, 3.8rem); font-weight: 850; letter-spacing: -.055em; line-height: 1.2; margin: 8px 0; }
.trip-intro h1 span { color: var(--rose); }
.trip-intro p { color: var(--muted); margin: 0; font-size: 1rem; }
.trip-art { width: 210px; height: 140px; object-fit: cover; mix-blend-mode: multiply; }
.trip-progress { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; padding: 18px 0 24px; font-size: .875rem; }
.progress-heart { margin-right: 7px; color: var(--rose); font-size: 1.25rem; }
.trip-progress strong { font-weight: 800; }
.progress-total, .progress-caption { color: var(--muted); }
.progress-caption { margin-left: auto; }
progress { appearance: none; width: 100%; height: 5px; border: 0; border-radius: 10px; overflow: hidden; background: #f1e5e6; color: #c88f9e; }
progress::-webkit-progress-bar { background: #f1e5e6; }
progress::-webkit-progress-value { background: #c88f9e; border-radius: 10px; transition: width .3s; }
progress::-moz-progress-bar { background: #c88f9e; border-radius: 10px; }
.filter-section { padding-top: 4px; }
.find-place { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 5; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 18px; border: 1px solid #dcaebe; border-radius: 999px; background: #f9dce5; color: var(--rose-dark); box-shadow: 0 5px 22px #78495324; font-size: .875rem; font-weight: 800; }
.places-section { padding-bottom: 40px; }
.search-row { display: flex; align-items: end; gap: 16px; }
.reach-select { display: grid; gap: 4px; color: var(--muted); font-size: .875rem; }
.reach-select select { min-width: 0; min-height: 52px; padding: 10px 12px; background: white; border: 1px solid var(--line); border-radius: 12px; font-size: 1rem; }
.search-wrap { position: relative; flex: 1; min-width: 0; }
.search-wrap > .icon { position: absolute; left: 17px; top: 16px; color: var(--rose); }
#search { width: 100%; min-height: 52px; padding: 12px 16px 12px 48px; background: white; border: 1px solid var(--line); border-radius: 15px; font-size: 1rem; box-shadow: var(--shadow); }
#search::placeholder { color: #84737b; opacity: 1; }
.category-select { display: none; }
.state-filters { display: inline-flex; gap: 5px; margin-top: 16px; padding: 5px; background: #f3e9ea; border-radius: 16px; }
.filter { display: flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid transparent; min-height: 44px; padding: 8px 20px; border-radius: 12px; background: transparent; font-size: .875rem; color: var(--muted); font-weight: 800; }
.filter span { font-size: .8125rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.filter.active { background: white; color: var(--rose-dark); box-shadow: 0 2px 6px #7047500b; }
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 12px; }
.chip { min-height: 44px; border-radius: 999px; padding: 7px 15px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: .875rem; font-weight: 700; transition: background .18s, border-color .18s; }
.chip[aria-pressed="true"] { background: var(--blush); border-color: #e7bbc8; color: var(--rose-dark); }
.list-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 22px 0 16px; }
.list-heading h2 { margin: 0; font-size: 1.125rem; font-weight: 800; letter-spacing: -.02em; }
.list-heading p { font-size: .8125rem; color: var(--muted); margin: 0; text-align: right; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 18px; }
.card { --category-bg: #f9eded; --category-ink: #805b65; position: relative; min-width: 0; display: flex; flex-direction: column; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 21px; box-shadow: var(--shadow); transition: background .2s, border-color .2s, box-shadow .2s; }
.card[data-category="Kawaii"] { --category-bg: #fbe7ee; --category-ink: #875064; }
.card[data-category="Weird"], .card[data-category="Curious"] { --category-bg: #f0eaf7; --category-ink: #756083; }
.card[data-category="Art"] { --category-bg: #faecdf; --category-ink: #84634d; }
.card[data-category="Food"], .card[data-category="Markets"] { --category-bg: #fff0d9; --category-ink: #80603d; }
.card[data-category="Malls & lifestyle"], .card[data-category="Museums"] { --category-bg: #f0eaf7; --category-ink: #756083; }
.card[data-category="Nature"], .card[data-category="Hikes"] { --category-bg: #edf1e5; --category-ink: #636f4a; }
.card[data-category="Fuji"], .card[data-category="Ocean"] { --category-bg: #e9f1f6; --category-ink: #546d7d; }
.card[data-category="Atmosphere"], .card[data-category="Day trip"] { --category-bg: #edf1e5; --category-ink: #636f4a; }
.card-photo { width: calc(100% + 42px); max-width: none; height: auto; aspect-ratio: 16 / 10; object-fit: cover; margin: -21px -21px 18px; border-radius: var(--radius) var(--radius) 0 0; background: var(--petal); }
.card[data-state="skip"] .card-photo { filter: saturate(.35); opacity: .75; }
.distance-note { color: #826244; font-size: .8125rem; margin-top: 10px; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.category-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; color: var(--category-ink); background: var(--category-bg); border-radius: 7px; font-size: .75rem; font-weight: 800; }
.area { display: flex; align-items: center; gap: 3px; font-size: .8125rem; color: var(--muted); }
.card-meta-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; font-weight: 700; color: #8a6a2f; white-space: nowrap; }
.rating small { font-weight: 600; color: var(--muted); }
.detail-rating { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.rating-source { font-size: .75rem; color: var(--muted); font-weight: 600; }
.area .icon { width: 13px; height: 13px; }
.card h3 { font-size: 1.3rem; line-height: 1.3; letter-spacing: -.025em; margin: 17px 0 9px; font-weight: 850; overflow-wrap: anywhere; }
.card p { margin: 0; font-size: 1rem; line-height: 1.6; color: #73646c; }
.tags { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 14px 0 16px; color: var(--muted); font-size: .75rem; }
.tags span { color: var(--muted); }
.card-bottom { margin-top: auto; }
.card-links { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; }
.details-btn { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 8px; min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: white; color: var(--rose-dark); font-size: .875rem; font-weight: 800; }
.details-btn .icon { width: 16px; height: 16px; }
.map-btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff8f6; color: var(--rose-dark); text-decoration: none; border: 1px solid #efdee2; min-height: 46px; border-radius: 12px; font-size: .875rem; font-weight: 800; }
.map-btn .icon { width: 16px; height: 16px; }
.state-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.5rem), 1fr)); gap: 3px; margin-top: 11px; padding: 3px; background: #f8f4f3; border-radius: 12px; }
.state-btn { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 8px 3px; border: 1px solid transparent; border-radius: 9px; background: transparent; font-size: .875rem; font-weight: 750; color: var(--muted); }
.state-btn .icon { width: 14px; height: 14px; }
.state-btn[aria-pressed="true"] { background: white; border-color: #eadbe0; color: var(--rose-dark); box-shadow: 0 2px 4px #78495305; }
.state-btn[data-state="visited"][aria-pressed="true"] { background: #e7efdf; border-color: #d7e1cd; color: #4c654b; }
.state-btn[data-state="skip"][aria-pressed="true"] { background: #e9e4e4; border-color: #dbd2d5; color: #6f6269; }
.card[data-state="visited"] { background: #fdfffb; border-color: #cdddc4; }
.visited-heart { display: none; color: #78966b; font-weight: 600; white-space: nowrap; }
.card[data-state="visited"] .visited-heart { display: inline; }
.card[data-state="skip"] { background: #f5f1ef; box-shadow: none; }
.card[data-state="skip"] h3 { color: #786b71; }
.card[data-state="skip"] .category-badge { background: #eae3e3; color: #786b71; }
.card[data-state="skip"] .map-btn { background: #faf7f5; }
.empty { grid-column: 1 / -1; text-align: center; padding: 40px 20px; border: 1px dashed #ddc3cb; border-radius: 24px; background: #fff4f4; }
.empty h3 { margin: 8px 0; font-size: 1.2rem; }
.empty p { margin: 0 0 18px; color: var(--muted); }
.empty .icon { width: 30px; height: 30px; color: var(--rose); }
.storage-warning { background: var(--cream); padding: 12px 16px; border: 1px solid #e8d4b0; border-radius: 14px; font-size: .875rem; }
dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 28px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 100px #493e4230; padding: 24px 28px; }
dialog::backdrop { background: #493e4266; backdrop-filter: blur(5px); }
body:has(dialog[open]) { overflow: hidden; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--line); background: white; border-radius: 50%; flex-shrink: 0; }
.memories { margin-block: 12px 28px; padding: 22px; background: var(--petal); border: 1px solid var(--line); border-radius: 24px; }
.memory-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.memory-photos figure { margin: 0; padding: 8px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.memory-photos img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.memory-photos figcaption { font-size: .8125rem; line-height: 1.35; padding-top: 7px; }
.report-heading { text-align: center; padding: 16px 0 22px; }
.report-heading .eyebrow { display: block; margin-top: 6px; }
.report-heading > .icon { width: 42px; height: 42px; color: var(--rose); fill: var(--blush); }
.report-heading h2 { font-size: 1.9rem; letter-spacing: -.045em; line-height: 1.25; margin: 10px 0; }
.report-heading p { margin: 0; font-size: .875rem; color: var(--muted); }
.report-category-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin: 0 0 24px; padding: 0; list-style: none; }
.report-category-list li { font-size: .8125rem; padding: 5px 11px; background: var(--blush); color: var(--rose-dark); border-radius: 999px; }
.report-group { padding: 0 18px; border: 1px solid var(--line); background: white; border-radius: 16px; margin: 12px 0; }
.report-group h3 { font-size: .875rem; color: var(--rose); margin: 14px 0 6px; }
.report-group ul { list-style: none; padding: 0; margin: 0; }
.report-group li { padding: 12px 0; border-top: 1px solid #f0e7e9; }
.report-group a { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; font-size: 1rem; font-weight: 750; }
.report-group .icon { width: 16px; height: 16px; color: var(--rose); }
.report-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px dashed #dfc3cb; padding-top: 18px; margin-top: 24px; }
.report-actions > span { color: var(--muted); font-size: .8125rem; }
#copyStatus { font-size: .875rem; }
#copyFallback label { font-size: .875rem; }
#reportText { width: 100%; border-radius: 12px; border: 1px solid var(--line); padding: 12px; background: white; font-size: 1rem; }
@media (hover: hover) {
  .card:hover { box-shadow: 0 8px 30px #7849530c; }
  .map-btn:hover, .chip:hover { background: #fbe8ed; border-color: #ddb9c4; }
  .state-btn:hover { color: var(--rose-dark); background: #f0e5e7; }
  .filter:hover { color: var(--rose-dark); }
}
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .trip-header { display: flex; flex-wrap: wrap; gap: 0 12px; padding-top: 20px; }
  .trip-intro { flex: 1 1 12rem; min-width: 0; }
  .trip-intro h1 { font-size: 2.25rem; overflow-wrap: anywhere; }
  .trip-intro h1 span { display: block; }
  .trip-intro .eyebrow { font-size: .75rem; letter-spacing: .1em; }
  .trip-intro p { display: none; }
  .trip-art { width: 115px; height: auto; flex: 0 1 27%; margin-inline: auto; }
  .trip-progress { flex: 1 0 100%; gap: 8px; padding: 12px 0 18px; font-size: .8125rem; }
  .progress-caption { font-size: .75rem; }
  .progress-total { display: none; }
  .search-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .search-wrap { grid-column: 1 / -1; }
  .reach-select select { min-height: 44px; width: 100%; }
  .category-select { display: grid; gap: 4px; font-size: .875rem; color: var(--muted); }
  .category-select select { flex: 1; min-width: 0; padding: 10px 12px; min-height: 44px; background: white; border: 1px solid var(--line); border-radius: 12px; font-size: 1rem; }
  .state-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.1rem), 1fr)); width: 100%; gap: 2px; padding: 4px; margin-top: 12px; }
  .filter { flex: 1; min-width: 0; gap: 5px; padding: 8px 4px; }
  .filter span { font-size: .75rem; }
  .category-chips { display: none; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .list-heading { margin: 22px 0 14px; }
  .list-heading h2 { font-size: 1rem; }
  .list-heading p { font-size: .75rem; }
  .card { padding: 19px; border-radius: 22px; }
  .card-photo { width: calc(100% + 38px); margin: -19px -19px 18px; border-radius: 22px 22px 0 0; }
  .card h3 { margin-top: 14px; font-size: 1.3rem; }
  .card p { font-size: 1rem; }
  dialog { padding: 18px; width: calc(100% - 20px); max-height: calc(100dvh - 24px); border-radius: 24px; }
  .report-heading h2 { font-size: 1.7rem; }
}
@media (max-width: 359px) {
  .trip-intro h1 { font-size: 2rem; }
  .trip-art { width: 94px; height: auto; }
  .state-btn { gap: 3px; font-size: .8125rem; }
  .filter span { display: none; }
}

/* Place details keep image credits and reading links beside each discovery. */
.detail-top { position: sticky; top: -24px; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 10px; background: var(--paper); }
#detailTitle { font-size: 1.8rem; letter-spacing: -.04em; line-height: 1.2; margin: 12px 0 6px; overflow-wrap: anywhere; }
.detail-area { margin: 0; color: var(--rose); font-size: .875rem; }
#detailExcerpt { margin-block: 18px; }
.access-note, .place-notice { padding: 12px 14px; border-radius: 14px; font-size: .875rem; background: #edf1ed; color: #4e6557; }
.place-notice { background: var(--cream); color: #795c3f; }
.photo-pair { display: grid; gap: 20px; margin-top: 24px; }
.photo-pair figure { margin: 0; }
.photo-pair img { width: 100%; height: auto; max-height: 440px; object-fit: contain; background: #f2ebe7; border-radius: 16px; }
.photo-pair figcaption { display: grid; gap: 3px; padding: 8px 2px 0; line-height: 1.45; font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.photo-pair figcaption a { font-size: .75rem; text-underline-offset: 3px; }
.detail-sources { margin-block: 24px; }
.detail-sources h3 { font-size: 1.1rem; margin: 0 0 8px; }
.detail-sources ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.detail-sources a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 2px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 750; font-size: 1rem; }
.detail-sources small { display: block; font-size: .8125rem; color: var(--muted); font-weight: 500; }
.detail-sources .icon { width: 16px; height: 16px; color: var(--rose); }
.detail-actions { position: sticky; bottom: -24px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 0 8px; background: var(--paper); border-top: 1px solid var(--line); }
.detail-actions .button { padding-inline: 10px; }
@media (max-width: 600px) {
  .detail-top { top: -18px; }
  .detail-actions { bottom: -18px; }
  .memories { padding: 16px; }
  .memory-photos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); gap: 8px; }
}
@media (max-width: 359px) {
  .card-links { grid-template-columns: 1fr; }
}
