﻿/* Journey view (My plan > My journeys): a pixel-art ocean dive per subject. */
.journey-host { width: 100%; }
@media (min-width: 1000px) {
  /* break out of the 860px reading column so the scene can be big */
  .journey-host { width: min(1320px, calc(100vw - 48px)); position: relative; left: 50%; transform: translateX(-50%); }
}
.jn { --deep: #061035; --gold: #ffcf4a; display: block; }

/* subject pills */
.jn-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.jn-pill { min-height: 44px; padding: 6px 16px; border-radius: var(--r-pill); border: 2px solid var(--sc, var(--brand)); background: var(--card); color: var(--sc, var(--brand)); font: inherit; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.jn-pill:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.jn-pill.on { background: var(--sc, var(--brand)); color: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.jn-pill:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* header */
.jn-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.jn-head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.jn-stats { margin: 4px 0 0; color: var(--ink-2); font-weight: 600; }
.jn-here { margin: 6px 0 0; padding: 6px 14px; display: inline-block; background: #fff7d6; border: 2px solid #ffd34a; border-radius: var(--r-pill); color: #5a4300; }
.jn-gohere { min-height: 44px; padding: 8px 18px; border: 0; border-radius: var(--r-pill); background: #0b2a5c; color: #fff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 3px 0 #04122e; }
.jn-gohere:hover { background: #12418a; }
.jn-gohere:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* layout */
.jn-layout { display: block; }
.jn-side { display: none; }
@media (min-width: 1000px) {
  .jn-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
  .jn-side { display: block; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; padding: 14px 10px 14px 12px; background: #0b1b44; border-radius: var(--r-l); color: #dbe9ff; box-shadow: var(--shadow-2); scrollbar-width: thin; scrollbar-color: #35508f transparent; }
}
.jn-side-title { padding: 0 8px 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #8fb2ee; }
.jn-side ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.jn-side-item { width: 100%; display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; text-align: left; padding: 7px 8px; border: 0; border-radius: 12px; background: transparent; color: inherit; font: inherit; font-size: 14px; line-height: 1.25; cursor: pointer; }
.jn-side-item:hover { background: rgba(255, 255, 255, .08); }
.jn-side-item:focus-visible { outline: 2px solid #ffd34a; }
.jn-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #1c3a7a; color: #9ec0ff; }
.jn-side-item.done .jn-num { background: var(--gold); color: #5a3d00; }
.jn-side-item.done { color: #b8c8e8; }
.jn-side-item.cur { background: rgba(255, 207, 74, .16); box-shadow: inset 0 0 0 2px #ffcf4a; color: #fff; font-weight: 700; }
.jn-side-item.cur .jn-num { background: #fff3b0; color: #5a3d00; box-shadow: 0 0 10px #ffd34a; }
.jn-side-item.sel { background: rgba(130, 180, 255, .24); }
.jn-side-lv { font-size: 12px; color: #8fb2ee; background: rgba(255, 255, 255, .08); padding: 1px 8px; border-radius: 99px; }

/* scene */
.jn-scene { position: relative; border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow-2); background: #0a1d52; }
.jn-svg { display: block; width: 100%; height: auto; font-family: var(--font); user-select: none; }

.jn-trail { stroke: rgba(255, 255, 255, .62); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 0.1 13; }
.jn-trail.lit { stroke: #ffe27a; stroke-width: 6; stroke-dasharray: 0.1 11; filter: drop-shadow(0 0 4px rgba(255, 220, 90, .9)); }

.jn-zone { fill: #fff; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.jn-end-label { fill: #fff; font-size: 20px; font-weight: 800; paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: 4px; }
.jn-end-sub { fill: #e8dcb5; font-size: 13px; font-weight: 600; }

.jn-label { font-size: 15px; font-weight: 700; paint-order: stroke; stroke-linejoin: round; stroke-width: 4px; }
.jn-svg.narrow .jn-label { font-size: 14px; }
.jn-label.d { fill: #08244f; stroke: rgba(255, 255, 255, .55); }
.jn-label.l { fill: #fff; stroke: rgba(3, 10, 40, .7); }
.jn-label.ahead { font-weight: 600; opacity: .88; }
.jn-label .jn-date { font-size: 12.5px; font-weight: 600; opacity: .9; }
.jn-lab-g.now .jn-label { font-weight: 800; }
.jn-lab-g.now .jn-label.l { fill: #fff7c2; }

/* lanterns */
.jn-marker { cursor: pointer; outline: none; }
.jn-lantern { transition: transform .18s; }
.jn-marker:hover .jn-lantern, .jn-marker:focus-visible .jn-lantern, .jn-marker.sel .jn-lantern { transform: scale(1.18); }
.jn-marker:focus-visible .jn-hit { stroke: #fff; stroke-width: 3; stroke-dasharray: 4 4; }
.jn-handle { stroke: #3a2a10; stroke-width: 2.5; stroke-linecap: round; }
.jn-cap { fill: #3a2a10; }
.jn-glass { stroke: #3a2a10; stroke-width: 2.5; fill: #7d93b3; }
.jn-mark { font-size: 14px; font-weight: 800; fill: #1a2b4a; }
.jn-marker.ahead .jn-glass { fill: #6f86a8; stroke: #223552; }
.jn-marker.ahead .jn-mark { fill: #dbe7f7; }
.jn-marker.ahead .jn-cap, .jn-marker.ahead .jn-handle { stroke: #223552; fill: #223552; }
.jn-marker.ahead .jn-handle { fill: none; }
.jn-marker.done .jn-glass { fill: #ffd34a; }
.jn-marker.done .jn-mark { fill: #5a3d00; font-size: 17px; }
.jn-marker.now .jn-glass { fill: #fff6b8; filter: drop-shadow(0 0 7px #ffd34a); }
.jn-marker.now .jn-mark { fill: #5a3d00; }
.jn-ring { fill: none; stroke: #fff2a0; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: jn-pulse 2.2s ease-out infinite; }
.jn-halo { animation: jn-breathe 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.jn-marker.sel .jn-hit { fill: rgba(255, 255, 255, .12); }
.jn-ld { fill: rgba(255, 255, 255, .28); }
.jn-ld.on { fill: #ffd34a; }
.jn-marker.now ~ .jn-levels .jn-ld { fill: rgba(255, 255, 255, .5); }

/* submarine */
.jn-sub { animation: jn-bob 3.6s ease-in-out infinite; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.jn-boat { animation: jn-rock 5s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.jn-trailb { animation: jn-trailb 2s linear infinite; }

/* ambient motion */
.jn-fish { animation: jn-drift 50s linear infinite; }
.jn-bub { animation: jn-rise 9s linear infinite; }
.jn-tw { animation: jn-twinkle 3s ease-in-out infinite; }
.jn-weed { animation: jn-sway 4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.jn-cloud { animation: jn-cloud 40s ease-in-out infinite alternate; }
.jn-sun { animation: jn-breathe 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes jn-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes jn-rock { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes jn-pulse { 0% { transform: scale(.7); opacity: .95; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes jn-breathe { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes jn-drift { from { transform: translateX(0); } to { transform: translateX(var(--d)); } }
@keyframes jn-rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .55; } 100% { transform: translateY(-90px); opacity: 0; } }
@keyframes jn-twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes jn-sway { 0%, 100% { transform: skewX(-5deg); } 50% { transform: skewX(5deg); } }
@keyframes jn-cloud { from { transform: translateX(0); } to { transform: translateX(26px); } }
@keyframes jn-trailb { 0% { transform: translateX(0); opacity: .8; } 100% { transform: translateX(-24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .jn-sub, .jn-boat, .jn-trailb, .jn-fish, .jn-bub, .jn-tw, .jn-weed, .jn-cloud, .jn-sun, .jn-ring, .jn-halo { animation: none !important; }
  .jn-ring { opacity: .6; }
  .jn-lantern, .jn-pill { transition: none; }
}

/* popover */
.jn-pop { position: absolute; z-index: 5; padding: 16px 18px 14px; border-radius: 18px; background: rgba(12, 18, 40, .96); color: #eaf1ff; box-shadow: 0 14px 40px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .12); border-top: 5px solid var(--sc, var(--brand)); backdrop-filter: blur(4px); animation: jn-pop .16s ease-out; }
@keyframes jn-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.jn-pop h3 { margin: 4px 28px 8px 0; font-family: var(--font-display); font-size: 21px; line-height: 1.2; color: #fff; }
.jn-pop p { margin: 6px 0; font-size: 14.5px; line-height: 1.4; }
.jn-pop-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9ec0ff; }
.jn-pop-x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.jn-pop-x:hover { background: rgba(255, 255, 255, .22); }
.jn-pop-x:focus-visible { outline: 2px solid #ffd34a; }
.jn-pop-status { display: inline-block; padding: 2px 12px; border-radius: 99px; font-weight: 700; font-size: 13px !important; background: rgba(255, 255, 255, .1); }
.jn-pop-status.done { background: #ffd34a; color: #4a3200; }
.jn-pop-status.now { background: #fff3b0; color: #4a3200; }
.jn-pop-next { font-weight: 700; color: #fff7c2; font-size: 16px !important; }
.jn-pop-meta { color: #b6c6e6; }
.jn-pop-dots { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 4px; }
.jn-pop-dots i { width: 8px; height: 8px; border-radius: 50%; background: #ffd34a; display: block; }
.jn-pop-after { margin-top: 10px !important; padding-top: 10px; border-top: 1px dashed rgba(255, 255, 255, .22); color: #cfe0ff; }
.jn-pop-after strong { color: #fff; }

@media (max-width: 640px) {
  .jn-head { align-items: flex-start; }
  .jn-gohere { width: 100%; }
  .jn-pill { padding: 6px 12px; min-height: 42px; }
  .jn-scene { border-radius: var(--r-m); }
}
