/* Uses the Journal's existing brand tokens and themes. */
.trail-page { cursor: auto; }
.trail-page a, .trail-page button, .trail-page select { cursor: pointer; }
.trail-page input, .trail-page textarea { cursor: text; }
.trail-page #cursorDot { display: none; }
.trail-page [hidden] { display: none !important; }
.trail-wrap { width: calc(100% - 2 * var(--gut)); max-width: 1440px; margin: 0 auto; }
.trail-head { padding: 3.8rem 0 2.2rem; }
.trail-head .back-link { margin-bottom: 1.5rem; }
.trail-head h1 { font-size: clamp(2.4rem, 5.4vw, 4.7rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; margin: .9rem 0 1.1rem; }
.trail-lead { max-width: 43rem; color: var(--text-secondary); font-size: 1rem; line-height: 1.8; }
.trail-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; }
.trail-link, .trail-button { font-family: inherit; font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-decoration: none; color: var(--text); background: var(--bg); border: 1px solid var(--border-light); padding: .8rem 1rem; line-height: 1.4; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; }
.trail-link:hover, .trail-button:hover { border-color: var(--accent-text); color: var(--accent-text); }
.trail-button.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.trail-button.primary:hover { background: var(--accent-text); border-color: var(--accent-text); color: #fff; }
.trail-button:disabled { opacity: .55; cursor: progress; }
.trail-button.danger { color: var(--accent-text); }
.trail-link:focus-visible, .trail-button:focus-visible, .trail-card:focus-visible, .trail-choice:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }
.trail-counts { display: flex; gap: 2rem; margin-top: 1.8rem; }
.trail-counts div { display: flex; align-items: baseline; gap: .55rem; }
.trail-counts strong { font-size: 1.35rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.trail-counts span { color: var(--text-tertiary); font-size: .66rem; }
.trail-preview { margin-top: 1.4rem; padding: .8rem 1rem; border: 1px solid var(--border); color: var(--text-secondary); font-size: .75rem; line-height: 1.6; }
.trail-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .8rem; padding: 1.5rem 0; border-top: 1px solid var(--border); }
.trail-field { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.trail-field label, .trail-field > span { color: var(--text-secondary); font-size: .73rem; }
.trail-field input, .trail-field select, .trail-field textarea { font-family: inherit; font-size: .85rem; color: var(--text); border: 1px solid var(--border-light); border-radius: 0; background: var(--bg); padding: .7rem .8rem; min-height: 42px; width: 100%; line-height: 1.6; }
.trail-field input:focus, .trail-field select:focus, .trail-field textarea:focus { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.trail-field textarea { resize: vertical; }
.trail-field input::placeholder, .trail-field textarea::placeholder { color: var(--text-tertiary); opacity: 1; }
.trail-search { flex: 1; min-width: 200px; }
.trail-toolbar select { min-width: 130px; }
.trail-check { display: inline-flex; align-items: center; gap: .65rem; color: var(--text-secondary); font-size: .76rem; line-height: 1.7; min-height: 42px; }
.trail-check input { width: 16px; height: 16px; accent-color: var(--accent-text); cursor: pointer; flex-shrink: 0; }
.trail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; min-height: 620px; border: 1px solid var(--border); margin-bottom: 4rem; }
.trail-map-wrap { position: relative; min-width: 0; isolation: isolate; background: var(--bg-subtle); }
.trail-map { height: 680px; width: 100%; background: #d6dedb; }
.trail-map .leaflet-control-attribution { font-size: 10px; font-family: var(--en); max-width: 100%; background: rgba(255,255,255,.94); color: #222; }
.trail-map .leaflet-control-attribution a { color: #245554; }
.trail-map .leaflet-control-zoom a { cursor: pointer; }
.trail-map .leaflet-marker-icon { cursor: pointer; }
.trail-map-message { position: absolute; top: 1rem; left: 3.5rem; right: 1rem; z-index: 700; padding: .7rem .9rem; background: var(--bg); color: var(--text); border: 1px solid var(--border-light); font-size: .74rem; line-height: 1.6; }
.trail-legend { position: absolute; left: 1rem; bottom: 2rem; z-index: 700; display: flex; gap: .85rem; background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); padding: .7rem .8rem; font-size: .65rem; pointer-events: none; }
.trail-legend span { display: flex; align-items: center; gap: .45rem; }
.trail-legend i { width: 8px; height: 8px; border: 2px solid var(--accent-text); border-radius: 50%; }
.trail-legend .stay i { border-radius: 0; transform: rotate(45deg); }
.trail-pin { background: none; border: none; }
.trail-pin-inner { width: 34px; height: 34px; display: grid; place-items: center; background: #fffaf5; color: #211d19; border: 2px solid #211d19; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.trail-pin-inner.stay { border-radius: 7px; }
.trail-pin-inner svg { width: 16px; height: 16px; }
.trail-pin.selected .trail-pin-inner { outline: 3px solid #fff; outline-offset: 2px; background: #211d19; color: #fff; }
.trail-pin.recommended .trail-pin-inner { border-color: #b44a28; color: #b44a28; }
.trail-pin.recommended::after { content: '★'; position: absolute; right: -5px; top: -8px; font-size: 14px; color: #fff; background: #b44a28; width: 20px; height: 20px; border-radius: 50%; text-align: center; line-height: 20px; }
.trail-results { padding: 1.3rem 1.5rem; overflow-y: auto; max-height: 680px; border-left: 1px solid var(--border); scroll-margin-top: 90px; }
.trail-results-summary { color: var(--text-tertiary); font-size: .7rem; margin-bottom: .7rem; }
.trail-card { font: inherit; background: none; border: 0; border-bottom: 1px solid var(--border); text-align: left; width: 100%; color: var(--text); padding: 1.1rem 0; display: block; }
.trail-card:hover .trail-card-name { color: var(--accent-text); }
.trail-card-meta { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; color: var(--text-tertiary); font-size: .64rem; margin-bottom: .65rem; }
.trail-card-name { font-size: 1.08rem; font-weight: 500; line-height: 1.5; display: block; }
.trail-card-count { display: block; color: var(--text-secondary); font-size: .7rem; margin-top: .65rem; }
.trail-badge { color: var(--accent-text); border: 1px solid var(--accent-text); padding: .15rem .4rem; font-size: .6rem; line-height: 1.5; display: inline-block; }
.trail-empty { padding: 2rem 0; color: var(--text-secondary); font-size: .82rem; line-height: 1.9; }
.trail-detail-head { display: flex; gap: .7rem; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.trail-text-button { font: inherit; font-size: .71rem; color: var(--text-secondary); background: none; border: 0; padding: .4rem 0; }
.trail-text-button:hover { color: var(--accent-text); }
.trail-place-title { font-size: 1.6rem; line-height: 1.4; font-weight: 500; margin-bottom: 1rem; }
.trail-address { color: var(--text-secondary); font-size: .8rem; line-height: 1.8; overflow-wrap: anywhere; }
.trail-map-links { display: flex; gap: .55rem; flex-wrap: wrap; margin: 1.3rem 0 1.8rem; }
.trail-map-links a { text-decoration: none; border-bottom: 1px solid var(--border-light); color: var(--text); font-size: .71rem; line-height: 1.8; }
.trail-map-links a:hover { color: var(--accent-text); border-color: var(--accent-text); }
.trail-review { border-top: 1px solid var(--border); padding: 1.3rem 0; }
.trail-review-meta { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
.trail-review-author { font-size: .82rem; font-weight: 600; }
.trail-review-rating { color: var(--accent-text); font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trail-review-date { margin: .4rem 0 .9rem; color: var(--text-tertiary); font-size: .68rem; }
.trail-review-detail { color: var(--text-secondary); font-size: .74rem; line-height: 1.8; margin-bottom: .8rem; }
.trail-review-note { font-size: .85rem; color: var(--text); line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.trail-notice { margin-bottom: 1.2rem; border-left: 2px solid var(--accent-text); padding: .6rem .9rem; font-size: .8rem; line-height: 1.7; color: var(--text); }
.trail-about { border-top: 1px solid var(--border); padding: 2rem 0 3rem; color: var(--text-secondary); font-size: .82rem; line-height: 1.9; max-width: 44rem; }
.trail-auth { max-width: 420px; border: 1px solid var(--border); padding: 2rem; margin: 0 0 4rem; }
.trail-auth h2 { font-size: 1.5rem; font-weight: 500; margin-bottom: .9rem; }
.trail-auth p { color: var(--text-secondary); font-size: .82rem; line-height: 1.8; margin-bottom: 1.4rem; }
.trail-auth .trail-button { margin-top: 1rem; }
.trail-choices { display: grid; gap: .6rem; }
.trail-choice { font: inherit; background: var(--bg); color: var(--text); border: 1px solid var(--border-light); text-align: left; padding: 1rem; font-size: .86rem; }
.trail-choice:hover { border-color: var(--accent-text); }
.trail-manage-bar { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 1rem 0 2rem; }
.trail-manage-bar strong { font-size: .9rem; font-weight: 500; }
.trail-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.trail-manage-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-bottom: 4rem; }
.trail-manage-card { padding: 1.6rem; border: 1px solid var(--border); min-width: 0; }
.trail-manage-card h2 { font-size: 1.25rem; font-weight: 500; line-height: 1.5; margin: .6rem 0; }
.trail-manage-card .trail-actions { margin: 1.2rem 0; }
.trail-own-review { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
.trail-own-review p { color: var(--text-secondary); font-size: .78rem; line-height: 1.8; margin: .7rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.trail-card-photo { width: 100%; height: 140px; object-fit: cover; display: block; margin-bottom: 1rem; }
.trail-manage-cover { width: 100%; height: 200px; object-fit: cover; display: block; margin-bottom: 1.2rem; }
.trail-gallery { margin: .8rem 0 1.5rem; }
.trail-gallery-main, .trail-photo-preview { width: 100%; display: block; padding: 0; border: 0; background: var(--bg-subtle); color: var(--text); cursor: zoom-in; }
.trail-gallery-main img { width: 100%; height: auto; max-height: 300px; object-fit: contain; display: block; }
.trail-gallery-caption, .trail-viewer-caption { font-size: .76rem; line-height: 1.8; margin-top: .65rem; overflow-wrap: anywhere; }
.trail-gallery-credit, .trail-viewer-credit { font-size: .64rem; color: var(--text-tertiary); line-height: 1.8; margin-top: .4rem; }
.trail-gallery-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; margin-top: .8rem; }
.trail-photo-thumb { border: 2px solid transparent; background: var(--bg-subtle); padding: 0; width: 100%; }
.trail-photo-thumb[aria-pressed="true"] { border-color: var(--accent-text); }
.trail-photo-thumb img { width: 100%; height: 58px; object-fit: cover; display: block; }
.trail-photo-viewer { width: min(1100px, calc(100% - 2rem)); }
.trail-viewer-stage { background: var(--bg-subtle); min-height: 150px; display: grid; place-items: center; }
.trail-viewer-stage img { width: 100%; height: auto; max-height: 65vh; max-height: 65dvh; object-fit: contain; display: block; }
.trail-viewer-nav { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-top: 1.2rem; }
.trail-viewer-index { font-size: .75rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.trail-photo-upload { border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; margin-bottom: 1.5rem; display: grid; gap: .85rem; }
.trail-photo-selection { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.trail-photo-selection img { width: 100%; height: 95px; object-fit: cover; display: block; }
.trail-photo-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.trail-photo-editor { border: 1px solid var(--border); padding: 1rem; min-width: 0; }
.trail-photo-preview img { width: 100%; height: 170px; object-fit: cover; display: block; }
.trail-photo-editor form { margin: 1rem 0; }
.trail-photo-editor .trail-actions { align-items: center; }
.trail-photo-dialog-info { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.trail-photo-dialog-info strong { font-size: .8rem; font-weight: 500; }
.trail-dialog { width: min(800px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); color: var(--text); background: var(--bg); border: 1px solid var(--border-light); margin: auto; padding: 1.6rem; overflow-y: auto; overscroll-behavior: contain; font-family: var(--en); }
.trail-dialog.kr { font-family: var(--kr); }
.trail-dialog::backdrop { background: rgba(0,0,0,.72); }
.trail-dialog-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.trail-dialog-head h2 { font-size: 1.5rem; line-height: 1.5; font-weight: 500; }
.trail-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.trail-form-grid .full { grid-column: 1 / -1; }
.trail-form-note { color: var(--text-secondary); font-size: .73rem; line-height: 1.8; margin: .4rem 0; }
.trail-location-map { height: 270px; background: #d6dedb; isolation: isolate; }
.trail-search-row { display: flex; gap: .6rem; align-items: flex-end; }
.trail-search-row .trail-field { flex: 1; }
.trail-location-results { display: grid; gap: .45rem; margin-top: .7rem; }
.trail-location-results button { font: inherit; text-align: left; border: 1px solid var(--border); padding: .7rem; background: var(--bg); color: var(--text-secondary); font-size: .72rem; line-height: 1.8; }
.trail-map-link-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: .55rem; align-items: flex-end; margin-bottom: .7rem; }
.trail-dialog .trail-map-link-row input { font-size: .75rem; }
.trail-form-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; margin-top: 1.5rem; }
.trail-feature { margin: 0 auto 2rem; border: 1px solid var(--border-light); border-left: 2px solid var(--accent); padding: 1.5rem 1.7rem; }
.trail-feature a { display: block; color: var(--text); text-decoration: none; }
.trail-feature strong { font-size: 1.45rem; font-weight: 500; display: block; margin-bottom: .6rem; }
.trail-feature p { color: var(--text-secondary); font-size: .85rem; line-height: 1.8; }
.trail-feature .trail-feature-label { color: var(--accent-text); font-size: .6rem; letter-spacing: .15em; margin-bottom: .75rem; display: block; }
@media (max-width: 1024px) {
  .trail-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .trail-map { height: 620px; }
  .trail-results { max-height: 620px; padding: 1.2rem; }
}
@media (max-width: 768px) {
  .trail-head { padding-top: 2rem; }
  .trail-head-row { flex-direction: column; gap: 1.3rem; }
  .trail-head h1 { font-size: 2.5rem; }
  .trail-counts { gap: 1.1rem; flex-wrap: wrap; }
  .trail-toolbar .trail-field { flex: 1; min-width: calc(50% - .4rem); }
  .trail-toolbar .trail-search { flex-basis: 100%; }
  .trail-toolbar select { min-width: 0; }
  .trail-layout { grid-template-columns: 1fr; }
  .trail-map { height: 410px; }
  .trail-results { max-height: none; border-left: 0; border-top: 1px solid var(--border); }
  .trail-manage-list { grid-template-columns: 1fr; }
  .trail-dialog { padding: 1.2rem; }
  .trail-form-grid { grid-template-columns: 1fr; }
  .trail-map-link-row { grid-template-columns: minmax(0, 1fr) auto; }
  .trail-map-link-row .trail-field:first-child { grid-column: 1 / -1; }
  .trail-dialog .trail-button { padding: .7rem; }
  .trail-location-map { height: 250px; }
  .trail-search-row { flex-wrap: wrap; }
  .trail-viewer-nav .trail-button { font-size: .62rem; }
  .trail-photo-selection { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .trail-photo-list { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .trail-page *, .trail-page *::before, .trail-page *::after { transition-duration: .01ms !important; }
}
