.jj-journey {
  --jj-ink: #213f39;
  --jj-paper: #fcf8eb;
  --jj-vermillion: #ac4b32;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--jj-ink);
  background: var(--jj-paper);
  border: 1px solid #c6cfb9;
  border-radius: 13px;
  isolation: isolate;
  font-family: inherit;
}
.jj-journey *, .jj-journey *::before, .jj-journey *::after { box-sizing: border-box; }
.jj-stage {
  height: clamp(255px, 25vw, 350px);
  min-height: 230px;
  position: relative;
  overflow: hidden;
  background: #e4ebd4;
}
.jj-scenery, .jj-marker-layer, .jj-cast {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.jj-scenery, .jj-cast { display: block; pointer-events: none; }
.jj-marker-layer { pointer-events: none; }
.jj-journey button { font: inherit; cursor: pointer; }
.jj-journey button:focus-visible, .jj-journey input:focus-visible {
  outline: 3px solid #b15228;
  outline-offset: 3px;
}
.jj-map-meta {
  position: absolute;
  left: 15px;
  top: 13px;
  background: #faf8ebed;
  color: #41564c;
  padding: 5px 8px;
  border: 1px solid #899b7f80;
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: .08em;
  pointer-events: none;
}
.jj-node {
  position: absolute;
  transform: translate(-50%, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2px 8px;
  min-width: 33px;
  pointer-events: auto;
  background: transparent;
  border: 0;
  color: #273e35;
  z-index: 1;
}
.jj-node[aria-current="step"] { z-index: 2; }
.jj-node-dot {
  border-radius: 100%;
  width: 12px;
  height: 12px;
  border: 2px solid #fff8de;
  box-shadow: 0 0 0 1px #5b6757;
  background: #71856b;
}
.jj-node-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 102px;
  margin-top: 5px;
  padding: 3px 7px;
  background: #fcfaeeed;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 1px 2px #3a54351a;
}
.jj-node[aria-current="step"] .jj-node-title {
  color: #fff9e9;
  border-color: #27473c;
  background: #315b49;
}
.jj-node[aria-current="step"] .jj-node-dot { background: #ab4d31; }
.jj-node[data-status="planned"] .jj-node-dot { background: #fff2d5; border: 2px dashed #99704f; }
.jj-node[data-status="pending"] .jj-node-dot { background: #f6f3db; border: 2px dotted #687363; }
.jj-empty-note {
  position: absolute;
  left: 50%;
  top: 51%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 85%;
  padding: 7px 13px;
  color: #314b40;
  background: #faf7eadd;
  border: 1px solid #8b9b8299;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
}
.jj-footer {
  background: #faf9ef;
  border-top: 1px solid #c5cfb7;
  padding: 9px 13px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.jj-journey .jj-action {
  box-sizing: border-box;
  min-height: 33px;
  color: #365043;
  background: #fffdf1;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.jj-journey .jj-action { padding: 5px 11px; }
.jj-journey .jj-action {
  background: var(--ink) var(--button-grain);
  background-blend-mode: soft-light;
  color: white;
}
.jj-journey .jj-action:hover { background-color: #394641; }
.jj-journey .jj-action:disabled { opacity: .48; cursor: default; }
.jj-foot-time { font-size: 11px; color: #627667; }
.jj-step-range { min-width: 44px; max-width: 130px; width: 20%; accent-color: #4d7359; }
.jj-film .jj-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #17332d24 10%, #122f2b40 30%, #102e29ec 100%);
  pointer-events: none;
}
.jj-film-caption-shell {
  z-index: 1;
  position: absolute;
  bottom: 22px;
  left: clamp(18px, 3vw, 44px);
  right: 25px;
  max-height: calc(100% - 75px);
  display: flex;
  flex-direction: column;
}
.jj-film-caption {
  min-block-size: 0;
  overflow: auto;
  scrollbar-width: none;
}
.jj-film-caption::-webkit-scrollbar {display: none}
.jj-film-scroll-track {
  position: absolute;
  inset-block: 8px;
  inset-inline-start: 5px;
  inline-size: 2.5px;
  border-radius: 2px;
  background: var(--film-line-bg, var(--film-line-fallback));
  background: color-mix(in srgb, var(--film-line-bg, var(--film-line-fallback)) 76%, transparent);
  pointer-events: none;
}
.jj-film-scroll-thumb {
  display: block;
  inline-size: 100%;
  border-radius: inherit;
  background: var(--film-line-ink, #000);
  background: color-mix(in srgb, var(--film-line-ink, #000) 70%, transparent);
}
.jj-film-caption small { font-size: 12px; letter-spacing: .08em; color: #e0e7cf; }
.jj-film-caption h3 {
  color: inherit;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-weight: 600;
  font-size: clamp(22px, 3.2vw, 38px);
  line-height: 1.3;
  letter-spacing: .025em;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.jj-film-caption p { margin: 5px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.jj-film .jj-map-meta {z-index: 2; pointer-events: none}
.jj-film-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jj-journey .jj-film-photo-trigger {
  position: absolute;
  inset: 0;
  display: block;
  inline-size: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.jj-journey .jj-film-photo-trigger:focus-visible {outline-offset: -5px}
.jj-journey [hidden] { display: none !important; }
.jj-journey {
  --jj-ink: var(--ink);
  --jj-paper: white;
  border: 0;
  border-radius: 0;
}
.jj-stage { background: #fcfcfb; }
.jj-map-meta, .jj-node-title, .jj-empty-note {
  background: #fff;
  border-color: var(--line);
  color: var(--soft);
  box-shadow: none;
}
.jj-node[aria-current="step"] .jj-node-title {
  color: var(--ink);
  border-color: #ccd6d1;
  background: #fff;
}
.jj-node[aria-current="step"] .jj-node-dot { background: var(--warm); }
.jj-footer { background: var(--white); border-color: var(--line); }
.jj-film .jj-stage::after { background: none; }
.jj-film-caption-shell {width: fit-content; max-width: calc(100% - 44px)}
.jj-film-caption {padding: 10px 16px}
@media (max-width: 550px) {
  .jj-stage { height: 242px; }
  .jj-footer { gap: 7px; padding: 8px; }
  .jj-node-title { max-width: 75px; padding: 2px 4px; font-size: 11px; }
  .jj-map-meta { left: 9px; top: 9px; }
  .jj-step-range { max-width: 80px; width: 15%; }
  .jj-journey .jj-action { padding: 5px 7px; }
}
@media (pointer: coarse) {
  .jj-journey .jj-action { min-height: 42px; }
  .jj-node { min-height: 42px; }
}

.jj-stage {height: clamp(210px, 36vw, 270px); min-height: 210px; border-radius: 0; background: #0d1b214b; border: 0}
.jj-scenery {opacity: .78}
/* The canvas paints the whole stage, so both background layers contribute. */
:is(.jj-map, .jj-explore) .jj-stage {background: rgb(13 27 33 / 12%)}
:is(.jj-map, .jj-explore) .jj-scenery {opacity: .44}
.jj-map-meta, .jj-empty-note {color: var(--soft); background: none; border: 0; padding: 0}
.jj-node-title, .jj-node[aria-current="step"] .jj-node-title {
  color: var(--ink); border: 0; background: #101d22e6; font-weight: 400;
}
.jj-node[aria-current="step"] .jj-node-title {font-weight: 600}
.jj-footer {padding: 10px 0 0; border: 0; gap: 12px}
.jj-journey .jj-action {min-width: 52px; background-color: var(--control); color: var(--ink)}
.jj-journey .jj-action:hover {background-color: var(--control-hover)}
.jj-node-dot {background: var(--island); border-color: var(--route); box-shadow: none}
.jj-film-caption-shell {--film-line-fallback: #fff; color: var(--ink)}
[data-theme="day"] .jj-film-caption-shell {--film-line-fallback: #e9ecee}
.jj-film-caption > * {white-space: pre-line}
.jj-film-line {
  background: var(--film-line-bg, var(--film-line-fallback));
  color: var(--film-line-ink, #000);
  padding-inline: .22em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.jj-film-caption small {color: var(--soft)}
.jj-film-caption .entry-companions, .jj-film-caption .entry-author {
  display: block;
  font-size: 12px;
  letter-spacing: normal;
}
.jj-foot-time {color: var(--soft); font-size: 12px; max-width: 50%; text-align: right; overflow-wrap: anywhere}
.jj-step-range {flex: 1; width: 100%; max-width: none; accent-color: var(--accent)}
.jj-journey, .jj-footer {background: transparent}
