/* The Company Ledger panel (js/ledger.js) */
.act-ledger { --c: #d9b36a; }
.ledger { display: grid; gap: .9rem; color: var(--ink-dim, #c4cbbd); }
.lg-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .6rem; }
.lg-stat { display: grid; gap: .15rem; padding: .6rem .75rem; border: 1px solid var(--line, rgba(214,224,211,.14)); border-radius: 8px; background: rgba(0,0,0,.2); }
.lg-stat.ok { border-color: rgba(127,161,111,.55); }
.lg-stat.warn { border-color: rgba(195,106,67,.6); }
.lg-label { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint, #89958a); }
.lg-stat b { color: var(--ink-bone, #edf0e7); font-size: 1rem; }
.lg-stat small { color: var(--ink-faint, #89958a); }
.lg-bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.lg-bar i { display: block; height: 100%; background: var(--ghost, #c7b66c); }
.lg-note { margin: 0; padding: .5rem .75rem; border-radius: 6px; border: 1px solid var(--line); }
.lg-note.good { border-color: rgba(127,161,111,.6); }
.lg-note.bad { border-color: rgba(195,106,67,.7); color: #e8b79e; }
.lg-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.lg-tabs .btn.on { border-color: var(--ghost, #c7b66c); color: var(--ink-bone, #edf0e7); }
.lg-empty { color: var(--ink-faint); padding: 1rem 0; }

.lg-lane { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; background: rgba(0,0,0,.18); display: grid; gap: .5rem; margin-bottom: .8rem; }
.lg-lane h4 { margin: 0; color: var(--ink-bone, #edf0e7); display: flex; align-items: baseline; gap: .6rem; }
.lg-merc { font-weight: 400; font-size: .75rem; color: var(--good, #7fa16f); }
.lg-merc.dead { color: #d0735a; }
.lg-track { position: relative; height: 2.1rem; border-radius: 6px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 12.5%), rgba(0,0,0,.35); overflow: hidden; }
.lg-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.18); }
.lg-idle { position: absolute; inset: 0; display: grid; place-items: center; font-size: .8rem; color: var(--ink-faint); }
.lg-block { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; display: grid; place-items: center; font-style: normal; font-size: .9rem;
  background: linear-gradient(180deg, rgba(199,182,108,.45), rgba(199,182,108,.2)); border: 1px solid rgba(199,182,108,.7); overflow: hidden; }
.lg-block.st-active { background: linear-gradient(180deg, rgba(127,161,111,.6), rgba(127,161,111,.28)); border-color: rgba(127,161,111,.9); }
.lg-block.st-paused { background: repeating-linear-gradient(45deg, rgba(120,140,180,.45) 0 6px, rgba(120,140,180,.2) 6px 12px); border-color: rgba(140,160,200,.8); }
.lg-block.st-blocked { background: rgba(195,106,67,.35); border-color: rgba(195,106,67,.85); }
.lg-axis { display: flex; justify-content: space-between; font-size: .7rem; color: var(--ink-faint); margin-top: -.25rem; }

.lg-row { border-top: 1px solid var(--line); padding: .6rem 0; display: grid; gap: .4rem; }
.lg-row-top { display: flex; align-items: center; gap: .6rem; }
.lg-ic { font-size: 1.25rem; }
.lg-title { flex: 1; }
.lg-title small { display: block; color: var(--ink-faint); }
.lg-diff { color: var(--ghost); font-size: .75rem; letter-spacing: -.1em; }
.lg-state { font-size: .72rem; padding: .15rem .5rem; border-radius: 999px; border: 1px solid var(--line-strong); white-space: nowrap; }
.lg-state.st-active, .lg-state.st-completed { border-color: rgba(127,161,111,.8); color: #b6d3a6; }
.lg-state.st-paused { border-color: rgba(140,160,200,.8); color: #b7c6ea; }
.lg-state.st-blocked, .lg-state.st-awaiting_delivery { border-color: rgba(195,106,67,.8); color: #e8b79e; }
.lg-row-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .15rem .9rem; font-size: .85rem; }
.lg-row-grid b { color: var(--ink-bone); }
.lg-prog { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.lg-prog i { display: block; height: 100%; background: var(--good, #7fa16f); }
.lg-why { margin: 0; color: #e8b79e; font-size: .85rem; }
.lg-odds { font-size: .85rem; }
.lg-odds ul { margin: .3rem 0 .3rem 1.1rem; padding: 0; }
.lg-row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.lg-cancel { color: #e08a74; }
.lg-later { font-size: .85rem; }
.lg-deliver { display: grid; gap: .15rem; font-size: .85rem; border-top: 1px dashed var(--line); padding-top: .5rem; }

.lg-book { display: grid; gap: .8rem; }
.lg-duties { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .5rem; }
.lg-duty, .lg-dur { display: grid; gap: .1rem; justify-items: center; padding: .6rem; border: 1px solid var(--line); background: rgba(0,0,0,.2); color: inherit; border-radius: 8px; cursor: pointer; font: inherit; }
.lg-duty.on, .lg-dur.on { border-color: var(--ghost, #c7b66c); background: rgba(199,182,108,.12); }
.lg-duty span { font-size: 1.4rem; }
.lg-duty:disabled { opacity: .45; cursor: not-allowed; }
.lg-durs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
@media (max-width: 640px) { .lg-durs { grid-template-columns: repeat(2, 1fr); } }
.lg-fields { display: flex; flex-wrap: wrap; gap: .6rem 1rem; }
.lg-fields label { display: grid; gap: .2rem; font-size: .8rem; }
.lg-fields select, .lg-cargo select, .lg-cargo input { background: #0f1a17; border: 1px solid #284840; border-radius: 5px; color: var(--ink-bone, #edf0e7); padding: .35rem .5rem; font: inherit; }
.lg-pub { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem; background: rgba(0,0,0,.18); font-size: .88rem; }
.lg-pub p { margin: .25rem 0; }
.lg-pub ul { margin: .2rem 0 .2rem 1.1rem; padding: 0; }
.lg-cargo { border: 1px dashed var(--line-strong); border-radius: 8px; padding: .6rem .8rem; }
.lg-cargo h5 { margin: 0 0 .4rem; }
.lg-cargo-add { display: flex; flex-wrap: wrap; gap: .4rem; }
.lg-cargo-add select { flex: 1 1 14rem; }
.lg-cargo-add input { width: 6rem; }
.lg-cargo ul { margin: .5rem 0; padding-left: 1.1rem; }

.lg-reports { display: grid; gap: 1.6rem; }
.lg-report { position: relative; border: 1px solid var(--line-strong, rgba(189,145,79,.35)); border-left: 4px solid #c9a35a; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, rgba(201,163,90,.07), rgba(0,0,0,.28) 140px); box-shadow: 0 10px 26px rgba(0,0,0,.38); }
.lg-report + .lg-report::before { content: ""; position: absolute; left: 0; right: 0; top: -1.1rem; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,163,90,.35), transparent); }
.lg-report header { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .75rem 1.1rem; background: rgba(0,0,0,.35); border-bottom: 1px solid var(--line, rgba(255,255,255,.1)); }
.lg-rep-no { font-family: inherit; font-size: .8rem; letter-spacing: .08em; padding: .2rem .55rem; border: 1px solid rgba(201,163,90,.55); border-radius: 6px; color: #e9c98f; background: rgba(201,163,90,.1); }
.lg-rep-head { flex: 1 1 14rem; min-width: 0; }
.lg-report h4 { margin: 0; font-size: 1.15rem; color: var(--ink-bone); }
.lg-rep-head small { color: var(--ink-faint, #8b8f8c); } .lg-rep-head small b { color: #cfd6d2; font-weight: 600; }
.lg-rep-body { padding: .4rem 1.1rem .7rem; }
.lg-report.major-exceptional { border-color: rgba(199,182,108,.7); border-left-color: #e8d27a; box-shadow: 0 10px 26px rgba(0,0,0,.38), 0 0 0 1px rgba(232,210,122,.25), 0 0 24px rgba(232,210,122,.12); }
.lg-report.major-failure { border-color: rgba(195,106,67,.7); border-left-color: #c36a43; }
.lg-scene { margin: .55rem 0; line-height: 1.55; }
.lg-scene.find { font-style: italic; color: var(--ghost); }
.lg-flag.good { color: var(--ghost); }
.lg-flag.bad { color: #e8b79e; }
.lg-account { margin: 0; padding: .6rem 1.1rem .8rem; background: rgba(0,0,0,.3); border-top: 1px solid var(--line, rgba(255,255,255,.1)); }
.lg-account h5 { margin: 0 0 .3rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #e9c98f; }
.lg-account ul { margin: 0; padding-left: 1.1rem; }
.lg-fleet h4 { margin: .8rem 0 .3rem; }
.lg-lost { color: var(--ink-faint); text-decoration: line-through; }

/* ---- in-progress animation: one per duty, only while the duty is Active (paused/booked stay still) ---- */
.lg-tabs .lg-cal { display: block; }
.lg-block { isolation: isolate; }
.lg-block .lg-fx { position: absolute; inset: 0; z-index: -1; opacity: 0; }
.lg-block .lg-glyph { font-style: normal; position: relative; }
.lg-prog i { position: relative; overflow: hidden; }
.lg-row.st-active .lg-prog i::after { content: ""; position: absolute; inset: 0; opacity: .55; }
.lg-block.st-active .lg-fx { opacity: 1; }

/* survey: a surveyor's chain - ticks marching along the line, glyph pacing the boundary */
@keyframes lgChain { to { background-position: 10px 0; } }
@keyframes lgPace { 0%,100% { transform: translateX(-2px) rotate(-6deg); } 50% { transform: translateX(3px) rotate(6deg); } }

/* explore: a compass needle searching, with a faint trail drawing ahead */
@keyframes lgTrail { to { background-position: 18px 0; } }
@keyframes lgNeedle { 0% { transform: rotate(-25deg); } 30% { transform: rotate(40deg); } 55% { transform: rotate(-10deg); } 80% { transform: rotate(25deg); } 100% { transform: rotate(-25deg); } }

/* fish: rolling swell under the block, glyph bobbing on it */
.d-fish.st-active .lg-fx, .lg-row.d-fish.st-active .lg-prog i::after {
  background: radial-gradient(circle at 50% 120%, rgba(255,255,255,.55) 0 38%, transparent 40%) 0 0 / 22px 100% repeat-x; animation: lgSwell 2.8s linear infinite; }
@keyframes lgSwell { to { background-position: 22px 0; } }
@keyframes lgBob { 0%,100% { transform: translateY(1px) rotate(-5deg); } 50% { transform: translateY(-3px) rotate(5deg); } }

/* haul: a road of dashes streaming past, glyph rattling over ruts */
@keyframes lgRoad { to { background-position: -26px 0; } }
@keyframes lgRattle { 0% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } 100% { transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .d-survey.st-active .lg-fx, .d-explore.st-active .lg-fx, .d-fish.st-active .lg-fx, .d-haul.st-active .lg-fx,
  .lg-row.st-active .lg-prog i::after, .lg-row.st-active .lg-ic-in, .lg-block.st-active .lg-glyph { animation: none !important; }
}

/* status strip */
.lg-stat { border-left-width: 3px; }
.lg-stat.ok { border-left-color: #7fa16f; }
.lg-stat.bad { border-color: rgba(195,106,67,.6); border-left-color: #d0735a; }
.lg-stat.paused { border-left-color: #7d94c9; }
.lg-stat.warn { border-left-color: #d9a441; }
.lg-stat.gold { border-left-color: #d9b36a; }
.lg-state-line { display: flex; align-items: center; gap: .5rem; }
.lg-badge { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; font-size: .8rem; line-height: 1; color: #10150f; }
.lg-badge.ok { background: #7fa16f; }
.lg-badge.bad { background: #d0735a; }
.lg-dot { width: .7rem; height: .7rem; border-radius: 50%; flex: none; }
.lg-dot.live { background: #7fc46a; box-shadow: 0 0 0 0 rgba(127,196,106,.7); animation: lgPulse 1.8s ease-out infinite; }
.lg-dot.paused { background: #7d94c9; }
@keyframes lgPulse { 70% { box-shadow: 0 0 0 .55rem rgba(127,196,106,0); } 100% { box-shadow: 0 0 0 0 rgba(127,196,106,0); } }
.lg-gold-num { color: #f2c75c; font-size: 1.15rem; text-shadow: 0 0 10px rgba(242,199,92,.25); font-variant-numeric: tabular-nums; }
.lg-bar.ok i { background: #7fa16f; }
.lg-bar.bad i { background: #d0735a; }
.lg-bar.land i { background: #8fb6d8; }
.lg-bar.warn i { background: #d9a441; }
@media (prefers-reduced-motion: reduce) { .lg-dot.live { animation: none; } }

/* duty artwork (images/guild/<duty>.webp) */
.lg-duty { position: relative; aspect-ratio: 3 / 2; min-height: 8.5rem; align-content: end; justify-items: center; padding: .6rem .6rem .7rem; overflow: hidden;
  background-size: cover; background-position: center; border: 1px solid rgba(217,179,106,.45); border-radius: 10px; color: #f1e2bf;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); transition: transform .15s, border-color .15s, box-shadow .15s; }
.lg-duty::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(8,8,10,0) 35%, rgba(8,8,10,.88) 100%); }
.lg-duty b, .lg-duty small { position: relative; z-index: 1; text-shadow: 0 1px 4px #000; }
.lg-duty b { font-size: 1.02rem; letter-spacing: .01em; }
.lg-duty:hover:not(:disabled) { transform: translateY(-2px); border-color: #d9b36a; }
.lg-duty.on { border-color: #f2c75c; box-shadow: 0 0 0 1px #f2c75c, 0 6px 18px rgba(0,0,0,.5); }
.lg-duty[data-duty="survey"], .d-survey .lg-ic-in, .lg-block.d-survey .lg-glyph { background-image: url(../images/guild/survey.webp); }
.lg-duty[data-duty="explore"], .d-explore .lg-ic-in, .lg-block.d-explore .lg-glyph { background-image: url(../images/guild/explore.webp); }
.lg-duty[data-duty="fish"], .d-fish .lg-ic-in, .lg-block.d-fish .lg-glyph { background-image: url(../images/guild/fish.webp); }
.lg-duty[data-duty="haul"], .d-haul .lg-ic-in, .lg-block.d-haul .lg-glyph { background-image: url(../images/guild/haul.webp); }
.lg-duty:disabled { opacity: 1; filter: grayscale(.6) brightness(.55); }
.lg-duty[data-duty="fish"]:not(:disabled) { filter: brightness(1.7) contrast(1.05); }
/* the same art as the small duty icon on rows and timeline blocks */
.lg-ic-in { display: block; width: 2.6rem; height: 2.6rem; border-radius: 8px; background-size: cover; background-position: center; font-size: 0; border: 1px solid rgba(217,179,106,.55); }
.lg-ic { font-size: 0; }
.lg-block { display: flex; align-items: center; justify-content: center; }
.lg-block .lg-glyph { display: block; width: 1.5rem; height: 1.5rem; border-radius: 5px; background-size: cover; background-position: center; font-size: 0; border: 1px solid rgba(255,255,255,.35); }

/* field notes */
.lg-notes { margin-top: .35rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.22); padding: .35rem .7rem .5rem; }
.lg-notes summary { cursor: pointer; color: var(--ink-bone); font-weight: 600; }
.lg-notes summary small { font-weight: 400; color: var(--ink-faint); margin-left: .5rem; }
.lg-notes ol { list-style: none; margin: .4rem 0 0; padding: 0; max-height: 22rem; overflow-y: auto; display: grid; gap: .55rem; }
.lg-note-e { border-left: 2px solid rgba(217,179,106,.35); padding: .1rem 0 .1rem .7rem; }
.lg-note-e time { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.lg-note-e p { margin: .1rem 0 .25rem; line-height: 1.5; font-style: italic; }
.lg-note-e.k-quiet p { color: var(--ink-dim); }
.lg-note-e.k-reward { border-left-color: #f2c75c; }
.lg-note-e.k-event, .lg-note-e.k-find { border-left-color: #8fb6d8; }
.lg-note-e.k-disaster { border-left-color: #d0735a; }
.lg-note-e.k-exceptional { border-left-color: #f2c75c; }
.lg-note-e.k-final { border-left-color: #7fa16f; }
.lg-note-e:first-child { animation: lgNew .9s ease-out; }
@keyframes lgNew { from { background: rgba(242,199,92,.18); } to { background: transparent; } }
.lg-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.lg-chip { font-size: .78rem; padding: .05rem .5rem; border-radius: 999px; border: 1px solid var(--line-strong); font-style: normal; font-variant-numeric: tabular-nums; }
.lg-chip.gold { color: #f2c75c; border-color: rgba(242,199,92,.6); }
.lg-chip.land { color: #8fb6d8; border-color: rgba(143,182,216,.6); }
.lg-chip.fish { color: #7fd0c4; border-color: rgba(127,208,196,.6); }
.lg-chip.find { color: #c9a0ee; border-color: rgba(201,160,238,.6); }
.lg-chip.bad { color: #e8b79e; border-color: rgba(208,115,90,.7); }
@media (prefers-reduced-motion: reduce) { .lg-note-e:first-child { animation: none; } }

/* Guild standing */
.lg-rank { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin: .1rem 0 .7rem; padding: .5rem .7rem; border: 1px solid rgba(201,163,90,.3); border-radius: 10px; background: rgba(201,163,90,.06); }
.lg-rank-badge { display: inline-flex; flex-direction: column; align-items: center; padding: .15rem .8rem; border-radius: 8px; border: 1px solid rgba(201,163,90,.6); background: rgba(0,0,0,.35); color: #e9c98f; line-height: 1.15; }
.lg-rank-badge b { font-size: .95rem; letter-spacing: .04em; } .lg-rank-badge small { font-size: .62rem; color: var(--ink-faint, #8b8f8c); }
.lg-rank-badge.r9 { border-color: #e8d27a; box-shadow: 0 0 14px rgba(232,210,122,.35); }
.lg-rank-bar { flex: 1 1 140px; min-width: 120px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.lg-rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a2c, #e9c98f); border-radius: inherit; }
.lg-rank-txt { flex: 1 1 100%; font-size: .78rem; color: var(--ink-faint, #8b8f8c); } .lg-rank-txt b { color: #cfd6d2; }

.lg-danger { margin: .4rem 0; padding: .5rem .7rem; border: 1px solid rgba(195,106,67,.7); border-left-width: 4px; border-radius: 8px; background: rgba(195,106,67,.12); color: #f0c4ad; }

/* ---- footsteps: a trail of shoe prints appears and fades in turn while a land duty is active ---- */
:root { --fp-l: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 22 12%22%3E%3Cg transform=%22translate(22,0) rotate(90)%22%3E%3Cg transform=%22rotate(-5 6 11)%22 fill=%22%23e9dcb8%22%3E%3Cpath fill-rule=%22evenodd%22 d=%22M2.1 7.6C1.9 4 3.7 1.4 6 1.4s4.1 2.6 3.9 6.2c-.1 1.9-.8 3.3-1.3 4.7H3.4C2.9 10.9 2.2 9.5 2.1 7.6zM3.3 4.2h5.4v.85H3.3zM3.3 6.3h5.4v.85H3.3zM3.3 8.4h5.4v.85H3.3zM3.3 10.5h5.4v.85H3.3z%22/%3E%3Cpath d=%22M3.3 15.4a2.7 2.7 0 0 1 2.7-2.7 2.7 2.7 0 0 1 2.7 2.7v2.9a2.7 2.7 0 0 1-2.7 2.7 2.7 2.7 0 0 1-2.7-2.7z%22/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); --fp-r: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 22 12%22%3E%3Cg transform=%22translate(22,0) rotate(90)%22%3E%3Cg transform=%22rotate(5 6 11)%22 fill=%22%23e9dcb8%22%3E%3Cpath fill-rule=%22evenodd%22 d=%22M2.1 7.6C1.9 4 3.7 1.4 6 1.4s4.1 2.6 3.9 6.2c-.1 1.9-.8 3.3-1.3 4.7H3.4C2.9 10.9 2.2 9.5 2.1 7.6zM3.3 4.2h5.4v.85H3.3zM3.3 6.3h5.4v.85H3.3zM3.3 8.4h5.4v.85H3.3zM3.3 10.5h5.4v.85H3.3z%22/%3E%3Cpath d=%22M3.3 15.4a2.7 2.7 0 0 1 2.7-2.7 2.7 2.7 0 0 1 2.7 2.7v2.9a2.7 2.7 0 0 1-2.7 2.7 2.7 2.7 0 0 1-2.7-2.7z%22/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); --fp-tile: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 30 24%22 width=%2230%22 height=%2224%22%3E%3Cg transform=%22translate(1,1) scale(.58) translate(22,0) rotate(90)%22%3E%3Cg transform=%22rotate(-5 6 11)%22 fill=%22%23e9dcb8%22%3E%3Cpath fill-rule=%22evenodd%22 d=%22M2.1 7.6C1.9 4 3.7 1.4 6 1.4s4.1 2.6 3.9 6.2c-.1 1.9-.8 3.3-1.3 4.7H3.4C2.9 10.9 2.2 9.5 2.1 7.6zM3.3 4.2h5.4v.85H3.3zM3.3 6.3h5.4v.85H3.3zM3.3 8.4h5.4v.85H3.3zM3.3 10.5h5.4v.85H3.3z%22/%3E%3Cpath d=%22M3.3 15.4a2.7 2.7 0 0 1 2.7-2.7 2.7 2.7 0 0 1 2.7 2.7v2.9a2.7 2.7 0 0 1-2.7 2.7 2.7 2.7 0 0 1-2.7-2.7z%22/%3E%3C/g%3E%3C/g%3E%3Cg transform=%22translate(16,11) scale(.58) translate(22,0) rotate(90)%22%3E%3Cg transform=%22rotate(5 6 11)%22 fill=%22%23e9dcb8%22%3E%3Cpath fill-rule=%22evenodd%22 d=%22M2.1 7.6C1.9 4 3.7 1.4 6 1.4s4.1 2.6 3.9 6.2c-.1 1.9-.8 3.3-1.3 4.7H3.4C2.9 10.9 2.2 9.5 2.1 7.6zM3.3 4.2h5.4v.85H3.3zM3.3 6.3h5.4v.85H3.3zM3.3 8.4h5.4v.85H3.3zM3.3 10.5h5.4v.85H3.3z%22/%3E%3Cpath d=%22M3.3 15.4a2.7 2.7 0 0 1 2.7-2.7 2.7 2.7 0 0 1 2.7 2.7v2.9a2.7 2.7 0 0 1-2.7 2.7 2.7 2.7 0 0 1-2.7-2.7z%22/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.d-survey.st-active .lg-fx, .d-explore.st-active .lg-fx, .d-haul.st-active .lg-fx {
  background: var(--fp-tile) 0 center / 30px 24px repeat-x; opacity: .95; animation: lgWalk 1.6s linear infinite; }
@keyframes lgWalk { to { background-position: 30px center; } }
.lg-steps { display: none; align-items: center; gap: 8px; flex: 0 0 auto; padding: 0 .4rem; }
.lg-row.st-active.d-survey .lg-steps, .lg-row.st-active.d-explore .lg-steps, .lg-row.st-active.d-haul .lg-steps { display: inline-flex; }
.lg-steps i { display: block; width: 26px; height: 14px; background: var(--fp-l) center / contain no-repeat; opacity: 0; animation: lgStep 2.4s ease-in-out infinite; }
.lg-steps i:nth-child(even) { background-image: var(--fp-r); transform: translateY(5px); }
.lg-steps i:nth-child(odd) { transform: translateY(-3px); }
.lg-steps i:nth-child(1) { animation-delay: 0s; } .lg-steps i:nth-child(2) { animation-delay: .3s; } .lg-steps i:nth-child(3) { animation-delay: .6s; }
.lg-steps i:nth-child(4) { animation-delay: .9s; } .lg-steps i:nth-child(5) { animation-delay: 1.2s; } .lg-steps i:nth-child(6) { animation-delay: 1.5s; }
@keyframes lgStep { 0%, 6% { opacity: 0; } 20%, 62% { opacity: .95; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .d-survey.st-active .lg-fx, .d-explore.st-active .lg-fx, .d-haul.st-active .lg-fx { animation: none; }
  .lg-steps i { animation: none; opacity: .8; }
}

/* Chances */
.lg-chances { display: grid; gap: .45rem; margin: .4rem 0; }
.lg-ch { display: grid; grid-template-columns: minmax(8rem, 1.6fr) minmax(5rem, 1fr) 3rem; align-items: center; gap: .6rem; font-size: .88rem; }
.lg-ch small { color: var(--ink-faint, #8b8f8c); font-size: .74rem; }
.lg-ch b { text-align: right; font-variant-numeric: tabular-nums; }
.lg-ch-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.lg-ch-bar i { display: block; height: 100%; border-radius: inherit; background: #8a8f8a; }
.lg-ch.good .lg-ch-bar i { background: #7fa16f; } .lg-ch.warn .lg-ch-bar i { background: #d9a441; }
.lg-ch.bad .lg-ch-bar i { background: #d0735a; } .lg-ch.find .lg-ch-bar i { background: #e9c98f; }
.lg-chances ul { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .84rem; color: var(--ink-dim, #b9c2bc); }
.lg-req-h { margin: .6rem 0 .2rem; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #e9c98f; }
@media (max-width: 560px) { .lg-ch { grid-template-columns: 1fr 3rem; } .lg-ch-bar { grid-column: 1 / -1; order: 3; } }

/* ---- the calendar ---- */
.lg-calendar { border: 1px solid rgba(217,179,106,.35); border-radius: 14px; background: linear-gradient(180deg, rgba(217,179,106,.07), rgba(0,0,0,.3) 120px); padding: .9rem; margin-bottom: 1rem; box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.lg-cal-top { display: flex; flex-wrap: wrap; align-items: stretch; gap: .8rem; margin-bottom: .8rem; }
.lg-clock { display: flex; align-items: center; gap: .9rem; padding: .6rem .9rem; border: 1px solid rgba(217,179,106,.4); border-radius: 12px; background: rgba(0,0,0,.35); }
.lg-clock-ic { font-size: 1.9rem; color: #f2c75c; text-shadow: 0 0 12px rgba(242,199,92,.5); }
.lg-clock.night .lg-clock-ic { color: #a9b8ff; text-shadow: 0 0 12px rgba(150,170,255,.5); }
.lg-clock small { display: block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint, #8b8f8c); }
.lg-clock b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; color: #f3e4c4; line-height: 1.1; }
.lg-clock span[data-gdate], .lg-clock-real span { display: block; font-size: .8rem; color: #b9c2bc; }
.lg-clock-real { padding-left: .9rem; border-left: 1px solid rgba(255,255,255,.12); }
.lg-clock-real b { font-size: 1.05rem; }
.lg-walker { display: flex; align-items: center; gap: .6rem; padding: .3rem .8rem .3rem .3rem; border: 1px solid rgba(127,161,111,.45); border-radius: 12px; background: radial-gradient(ellipse at 25% 50%, rgba(127,161,111,.16), rgba(0,0,0,.35) 70%); min-width: 17rem; }
.lg-walker-3d { width: 105px; height: 140px; flex: none; overflow: hidden; border-radius: 8px; }
.lg-walker-3d canvas { width: 100% !important; height: 100% !important; object-fit: contain; cursor: grab; touch-action: none; }
.lg-walker-info b { display: block; color: #f3e4c4; } .lg-walker-info small { display: block; color: #b9c2bc; font-size: .8rem; }
.lg-wbar { display: block; height: 6px; border-radius: 999px; background: rgba(255,255,255,.1); margin: .35rem 0; overflow: hidden; }
.lg-wbar i { display: block; height: 100%; background: linear-gradient(90deg, #5f8a52, #a8d28f); }
.lg-zoom { margin-left: auto; display: flex; align-items: center; gap: .3rem; align-self: flex-end; }
.lg-zoom small { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint, #8b8f8c); margin-right: .3rem; }
.lg-zoom button { padding: .25rem .65rem; border-radius: 999px; border: 1px solid #3a5a52; background: rgba(0,0,0,.3); color: #cfe8df; cursor: pointer; font: inherit; font-size: .8rem; }
.lg-zoom button.on { background: #46d6a8; border-color: #46d6a8; color: #04140e; font-weight: 600; }

.lg-cal-grid { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; overflow: hidden; background: rgba(0,0,0,.28); }
.lg-cal-who { border-right: 1px solid rgba(255,255,255,.12); }
.lg-cal-corner { height: 44px; display: flex; align-items: flex-end; padding: 0 .6rem .35rem; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint, #8b8f8c); border-bottom: 1px solid rgba(255,255,255,.1); }
.lg-cwho { display: block; width: 100%; height: 66px; text-align: left; padding: .5rem .6rem; border: 0; border-bottom: 1px solid rgba(255,255,255,.07); background: transparent; color: inherit; cursor: pointer; font: inherit; }
.lg-cwho:hover, .lg-cwho.sel { background: rgba(127,161,111,.14); }
.lg-cwho b { display: block; color: #f3e4c4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-cwho small { display: flex; align-items: center; gap: .35rem; font-size: .74rem; color: #b9c2bc; }
.lg-cwho .lg-dot { width: .55rem; height: .55rem; } .lg-dot.dead { background: #d0735a; }
.lg-cal-scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: #5b6b62 transparent; }
.lg-cal-inner { position: relative; }
.lg-cal-axis { position: relative; height: 44px; border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.25); }
.lg-hr { position: absolute; top: 0; bottom: 0; }
.lg-hr i { position: absolute; left: 0; bottom: 0; width: 1px; height: 9px; background: rgba(255,255,255,.35); }
.lg-hr em { position: absolute; left: 4px; bottom: 9px; font-style: normal; font-size: .68rem; color: #aab4ae; white-space: nowrap; }
.lg-day { position: absolute; top: 0; height: 100%; border-left: 1px solid rgba(217,179,106,.6); }
.lg-day b { position: absolute; left: 5px; top: 3px; font-size: .74rem; color: #e9c98f; letter-spacing: .04em; white-space: nowrap; }
.lg-crow { position: relative; height: 66px; border-bottom: 1px solid rgba(255,255,255,.07);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px var(--px)); }
.lg-nowline { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: #46d6a8; box-shadow: 0 0 10px rgba(70,214,168,.8); }
.lg-idle2 { position: sticky; left: 12px; display: inline-block; padding: 1.35rem 0 0 12px; font-size: .82rem; color: var(--ink-faint, #8b8f8c); }
.lg-idle2.plain { padding: .4rem 0; }
.lg-cblock { position: absolute; top: 7px; height: 52px; display: flex; align-items: center; gap: .45rem; padding: 0 .5rem 0 .35rem; border-radius: 9px;
  border: 1px solid rgba(199,182,108,.75); background: linear-gradient(180deg, rgba(199,182,108,.4), rgba(199,182,108,.16)); color: #f3e4c4; cursor: pointer; overflow: hidden; text-align: left; font: inherit; isolation: isolate; }
.lg-cblock.st-active { border-color: rgba(127,161,111,.95); background: linear-gradient(180deg, rgba(127,161,111,.55), rgba(127,161,111,.22)); }
.lg-cblock.st-paused { border-color: rgba(140,160,200,.9); background: linear-gradient(180deg, rgba(120,140,180,.45), rgba(120,140,180,.2)); }
.lg-cblock.st-blocked { border-color: rgba(195,106,67,.9); background: rgba(195,106,67,.3); }
.lg-cblock:hover { filter: brightness(1.15); }
.lg-cblock .lg-fx { position: absolute; inset: 0; z-index: -1; opacity: 0; }
.lg-cblock.st-active .lg-fx { opacity: .55; }
.lg-cprog { position: absolute; left: 0; top: 0; bottom: 0; z-index: -1; background: rgba(168,210,143,.28); border-right: 1px solid rgba(168,210,143,.7); }
.lg-cart { flex: none; width: 36px; height: 36px; border-radius: 7px; background-size: cover; background-position: center; border: 1px solid rgba(255,255,255,.35); }
.d-survey.lg-cblock .lg-cart { background-image: url(../images/guild/survey.webp); }
.d-explore.lg-cblock .lg-cart { background-image: url(../images/guild/explore.webp); }
.d-fish.lg-cblock .lg-cart { background-image: url(../images/guild/fish.webp); }
.d-haul.lg-cblock .lg-cart { background-image: url(../images/guild/haul.webp); }
.lg-ctext { min-width: 0; display: grid; }
.lg-ctext strong { font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-ctext small { font-size: .7rem; color: rgba(243,228,196,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-chours { margin-left: auto; font-style: normal; font-size: .7rem; padding: 1px 6px; border-radius: 999px; background: rgba(0,0,0,.35); }
.lg-cblock.tiny .lg-ctext, .lg-cblock.tiny .lg-chours { display: none; }
.lg-cblock.tiny { justify-content: center; padding: 0; } .lg-cblock.tiny .lg-cart { width: 28px; height: 28px; }
.lg-row.flash { animation: lgFlash 1.6s ease-out; }
@keyframes lgFlash { 0% { background: rgba(70,214,168,.3); } 100% { background: transparent; } }
@media (max-width: 700px) { .lg-cal-grid { grid-template-columns: 6.5rem minmax(0, 1fr); } .lg-zoom { margin-left: 0; } }

/* ---- the brief ---- */
.lg-brief h3 { margin: .2rem 0 .6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
.lg-brief h3 small { font-size: .82rem; font-weight: 400; color: var(--ink-faint, #8b8f8c); }
.lg-btotals { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; padding: .6rem .8rem; margin-bottom: .8rem; border: 1px solid rgba(217,179,106,.4); border-radius: 12px; background: rgba(217,179,106,.07); }
.lg-btotals em { font-style: normal; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #e9c98f; margin-right: .4rem; }
.lg-btotals span { padding: .15rem .6rem; border-radius: 999px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.12); font-size: .84rem; }
.lg-btotals span b { color: #f3e4c4; } .lg-btotals .gold b { color: #f2c75c; } .lg-btotals .land b { color: #8fb6d8; } .lg-btotals .find b { color: #e9c98f; }
.lg-bcard { border: 1px solid rgba(255,255,255,.14); border-left: 4px solid rgba(199,182,108,.8); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .7rem; background: rgba(0,0,0,.22); }
.lg-bcard.st-active { border-left-color: #7fa16f; background: linear-gradient(90deg, rgba(127,161,111,.12), rgba(0,0,0,.22) 40%); }
.lg-bcard.st-paused { border-left-color: #8ca0c8; } .lg-bcard.st-blocked { border-left-color: #c36a43; }
.lg-bcard header { display: flex; align-items: center; gap: .7rem; }
.lg-bcard header > div { flex: 1; min-width: 0; } .lg-bcard header b { display: block; color: #f3e4c4; } .lg-bcard header small { color: var(--ink-faint, #8b8f8c); }
.lg-bcard .lg-cart { flex: none; width: 42px; height: 42px; border-radius: 8px; background-size: cover; background-position: center; border: 1px solid rgba(217,179,106,.55); }
.d-survey.lg-bcard .lg-cart { background-image: url(../images/guild/survey.webp); } .d-explore.lg-bcard .lg-cart { background-image: url(../images/guild/explore.webp); }
.d-fish.lg-bcard .lg-cart { background-image: url(../images/guild/fish.webp); } .d-haul.lg-bcard .lg-cart { background-image: url(../images/guild/haul.webp); }
.lg-bout { list-style: none; margin: .55rem 0 .3rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .3rem .9rem; }
.lg-bout li { display: flex; gap: .5rem; align-items: baseline; font-size: .86rem; color: #cfd6d2; }
.lg-bout li i { font-style: normal; width: 1.1rem; flex: none; text-align: center; }
.lg-bout li b { color: #f3e4c4; margin-right: .25rem; } .lg-bout small { color: var(--ink-faint, #8b8f8c); }
.lg-bout .lg-cx { color: #b9c2bc; }
.lg-bmore { margin-top: .3rem; } .lg-bmore > summary { cursor: pointer; font-size: .82rem; color: #a9d5ca; }
.lg-bmore .lg-row { border-top: 0; padding: .4rem 0 0; }
.lg-bmore .lg-row-top .lg-ic, .lg-bmore .lg-steps { display: none; }
.lg-bcard.flash { animation: lgFlash 1.6s ease-out; }

/* ---- Guild sub-tabs: the same themed finish as the action tabs, in the Guild's gold ---- */
.lg-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: .2rem 0 .9rem; padding-bottom: .7rem; border-bottom: 1px solid rgba(217,179,106,.28); }
.lg-tab {
  --c: #d9b36a; position: relative; display: inline-flex; align-items: center; gap: .55rem; min-height: 46px; padding: .55rem 1.1rem; cursor: pointer;
  border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c) 32%, rgba(255,255,255,.08)); color: #d8cdb4; font: 650 .8rem/1 var(--font-ui, inherit);
  letter-spacing: .09em; text-transform: uppercase;
  background: radial-gradient(ellipse 100% 90% at 50% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 75%), linear-gradient(180deg, rgba(255,255,255,.045), rgba(0,0,0,.3)), rgba(14,12,9,.85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -8px 14px rgba(0,0,0,.28), 0 2px 6px rgba(0,0,0,.35);
  transition: border-color .18s, box-shadow .22s, color .18s, filter .18s;
}
.lg-tab::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--c); box-shadow: 0 0 12px var(--c); opacity: 0; transform: scaleX(.3); transition: opacity .2s, transform .25s; }
.lg-tab-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--c);
  border: 1.5px solid color-mix(in srgb, var(--c) 65%, transparent); background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 26%, transparent), rgba(0,0,0,.35)); }
.lg-tab-ic svg { width: 17px; height: 17px; }
.lg-tab:hover, .lg-tab:focus-visible { border-color: color-mix(in srgb, var(--c) 78%, white 6%); color: #fff; filter: brightness(1.1); outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent), 0 0 18px color-mix(in srgb, var(--c) 26%, transparent); }
.lg-tab:hover::after { opacity: .6; transform: scaleX(.6); }
.lg-tab:focus-visible { outline: 2px solid color-mix(in srgb, var(--c) 80%, white); outline-offset: 2px; }
.lg-tab.on { color: #fff; border-color: color-mix(in srgb, var(--c) 85%, white 5%);
  background: radial-gradient(ellipse 100% 90% at 50% 0%, color-mix(in srgb, var(--c) 36%, transparent), transparent 78%), linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, rgba(255,255,255,.04)), rgba(0,0,0,.32)), rgba(14,12,9,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent), 0 6px 18px color-mix(in srgb, var(--c) 20%, rgba(0,0,0,.5)); }
.lg-tab.on::after { opacity: 1; transform: scaleX(1); left: 8%; right: 8%; }
.lg-tab.on .lg-tab-ic { box-shadow: 0 0 12px color-mix(in srgb, var(--c) 55%, transparent); }
.lg-tab.t-board { --c: #46d6a8; } .lg-tab.t-book { --c: #e9c98f; } .lg-tab.t-reports { --c: #8fb6d8; } .lg-tab.t-fleet { --c: #7fa16f; }
.lg-tab .lg-cal { width: 17px; height: 17px; }
@media (max-width: 560px) { .lg-tab { padding: .5rem .7rem; font-size: .72rem; letter-spacing: .05em; } .lg-tab.t-board .lg-tab-l { display: none; } }
@media (prefers-reduced-motion: reduce) { .lg-tab, .lg-tab::after { transition: none; } }

/* ---- animated mercenary cards in the calendar's left column ---- */
.lg-cal-grid { grid-template-columns: 15.5rem minmax(0, 1fr); }
.lg-cwho { display: flex; align-items: center; gap: .5rem; height: 124px; padding: .35rem .6rem .35rem .3rem; cursor: default;
  border-bottom: 1px solid rgba(255,255,255,.07); background: radial-gradient(ellipse at 22% 50%, rgba(127,161,111,.13), transparent 65%); }
.lg-cwho.busy { background: radial-gradient(ellipse at 22% 50%, rgba(127,161,111,.28), transparent 70%); }
.lg-cwho-3d { flex: none; width: 82px; height: 112px; border-radius: 8px; overflow: hidden; }
.lg-cwho-3d canvas { width: 100% !important; height: 100% !important; object-fit: contain; cursor: grab; touch-action: none; }
.lg-cwho-txt { min-width: 0; display: grid; gap: 1px; }
.lg-cwho-txt b { font-size: 1rem; color: #f3e4c4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-cwho-txt small { font-size: .74rem; color: #b9c2bc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-cwho-st { display: flex; align-items: center; gap: .35rem; color: #cfe8df !important; }
.lg-cwho-rank { color: #e9c98f !important; }
.lg-crow { height: 124px; }
.lg-cblock { top: 10px; height: 104px; align-items: flex-start; flex-wrap: wrap; align-content: center; padding: .4rem .55rem; gap: .35rem .5rem; }
.lg-cblock .lg-cart { width: 44px; height: 44px; }
.lg-cblock .lg-ctext strong { font-size: .92rem; } .lg-cblock .lg-ctext small { font-size: .76rem; }
.lg-cblock .lg-chours { position: absolute; right: .45rem; bottom: .4rem; margin: 0; }
.lg-cal-corner { height: 44px; }
@media (max-width: 760px) { .lg-cal-grid { grid-template-columns: 9rem minmax(0, 1fr); } .lg-cwho-3d { width: 56px; height: 90px; } .lg-cwho-rank { display: none; } }

.lg-bwalk { flex: none; width: 66px; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(127,161,111,.5);
  background: radial-gradient(ellipse at 50% 60%, rgba(127,161,111,.28), rgba(0,0,0,.4) 75%); }
.lg-bwalk canvas { width: 100% !important; height: 100% !important; object-fit: contain; cursor: grab; touch-action: none; }

/* ---- a mission's window takes the look of the ground it is in ---- */
.lg-bcard.themed { position: relative; overflow: hidden; isolation: isolate; border-color: color-mix(in srgb, var(--a1) 45%, rgba(255,255,255,.1)); border-left-color: var(--a1);
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, color-mix(in srgb, var(--a1) 22%, transparent), transparent 70%),
    linear-gradient(100deg, color-mix(in srgb, var(--a2) 92%, #000), rgba(8,9,10,.9) 85%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a1) 14%, transparent), 0 6px 18px rgba(0,0,0,.35); }
.lg-bcard.themed::after { content: attr(data-glyph); position: absolute; right: 1rem; top: .2rem; z-index: -1; font-size: 5.5rem; line-height: 1; opacity: .14; filter: saturate(.7); pointer-events: none; }
.lg-bcard.themed header b { text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.lg-bcard.themed header small { color: color-mix(in srgb, var(--a1) 55%, #cfd6d2); }
.lg-bcard.themed .lg-bwalk { border-color: color-mix(in srgb, var(--a1) 70%, transparent); background: radial-gradient(ellipse at 50% 70%, color-mix(in srgb, var(--a1) 30%, transparent), rgba(0,0,0,.45) 78%); }
.lg-bcard.themed .lg-bout li b { color: color-mix(in srgb, var(--a1) 25%, #f3e4c4); }
.lg-bcard.themed .lg-bmore > summary { color: color-mix(in srgb, var(--a1) 75%, white); }
.lg-bcard.themed .lg-prog i { background: var(--a1); }
.lg-cblock[style*="--a1"] { border-color: color-mix(in srgb, var(--a1) 80%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--a1) 38%, transparent), color-mix(in srgb, var(--a2) 80%, transparent)); }
.lg-cblock[style*="--a1"].st-active { box-shadow: 0 0 0 1px var(--a1), 0 0 14px color-mix(in srgb, var(--a1) 40%, transparent); }

/* calendar blocks: text only (no picture, no footprints) */
.lg-cblock { padding: .4rem .7rem; }
.lg-cblock.tiny .lg-ctext { display: grid; }
.lg-cblock.tiny .lg-ctext small, .lg-cblock.tiny .lg-chours { display: none; }
.lg-cblock.tiny .lg-ctext strong { font-size: .72rem; }

/* ---- Chances, tidied: name on the left, its bar and percentage right beside it ---- */
.lg-chances { display: grid; gap: 0; max-width: 34rem; margin: .4rem 0; border: 1px solid rgba(255,255,255,.09); border-radius: 10px; background: rgba(0,0,0,.22); overflow: hidden; }
.lg-ch { display: grid; grid-template-columns: 12.5rem minmax(5rem, 1fr) 3rem; align-items: center; gap: .7rem; padding: .42rem .8rem;
  border-bottom: 1px solid rgba(255,255,255,.06); border-left: 3px solid rgba(255,255,255,.18); font-size: .88rem; }
.lg-ch:last-of-type { border-bottom: 0; }
.lg-ch:hover { background: rgba(255,255,255,.04); }
.lg-ch.good { border-left-color: #7fa16f; } .lg-ch.warn { border-left-color: #d9a441; } .lg-ch.bad { border-left-color: #d0735a; } .lg-ch.find { border-left-color: #e9c98f; }
.lg-ch-l { display: flex; flex-direction: column; min-width: 0; color: #e9e2cf; line-height: 1.2; }
.lg-ch-l small { font-size: .72rem; color: var(--ink-faint, #8b8f8c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-ch-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.lg-ch-bar i { display: block; height: 100%; border-radius: inherit; background: #8a8f8a; }
.lg-ch.good .lg-ch-bar i { background: #7fa16f; } .lg-ch.warn .lg-ch-bar i { background: #d9a441; }
.lg-ch.bad .lg-ch-bar i { background: #d0735a; } .lg-ch.find .lg-ch-bar i { background: #e9c98f; }
.lg-ch b { text-align: right; font-variant-numeric: tabular-nums; color: #f3e4c4; }
.lg-chips2 { display: flex; flex-wrap: wrap; gap: .4rem; padding: .55rem .8rem; background: rgba(0,0,0,.28); border-top: 1px solid rgba(255,255,255,.07); }
.lg-chips2 span { padding: .15rem .6rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.3); font-size: .78rem; color: #d8cdb4; white-space: nowrap; }
@media (max-width: 560px) { .lg-ch { grid-template-columns: 1fr 3rem; } .lg-ch-bar { grid-column: 1 / -1; order: 3; } }

/* ---- the mercenary picker: pick the figure, not a list ---- */
.lg-pickfield { grid-column: 1 / -1; display: grid; gap: .35rem; }
.lg-pickfield > span { font-size: .85rem; color: #a9d5ca; }
.lg-pick { display: flex; flex-wrap: wrap; gap: .6rem; }
.lg-pickcard { position: relative; display: grid; justify-items: center; gap: 2px; width: 8.6rem; padding: .45rem .4rem .55rem; cursor: pointer; font: inherit; color: #d8cdb4;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: radial-gradient(ellipse at 50% 35%, rgba(127,161,111,.14), rgba(0,0,0,.35) 75%), rgba(14,12,9,.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 6px rgba(0,0,0,.35); transition: border-color .18s, box-shadow .2s, filter .18s; }
.lg-pickcard:hover:not(:disabled) { border-color: rgba(233,201,143,.7); filter: brightness(1.1); }
.lg-pickcard.on { border-color: #46d6a8; box-shadow: 0 0 0 1px #46d6a8, 0 6px 18px rgba(70,214,168,.2); background: radial-gradient(ellipse at 50% 35%, rgba(70,214,168,.24), rgba(0,0,0,.35) 75%), rgba(14,12,9,.9); }
.lg-pickcard.on::after { content: "✓"; position: absolute; top: .35rem; right: .45rem; width: 1.2rem; height: 1.2rem; display: grid; place-items: center; border-radius: 50%; background: #46d6a8; color: #04140e; font-size: .78rem; font-weight: 700; }
.lg-pickcard.dead { opacity: .5; filter: grayscale(.8); cursor: not-allowed; }
.lg-pick3d { width: 96px; height: 128px; border-radius: 8px; overflow: hidden; pointer-events: none; }
.lg-pick3d canvas { width: 100% !important; height: 100% !important; object-fit: contain; }
.lg-pickcard b { color: #f3e4c4; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-pickcard small { font-size: .72rem; color: #b9c2bc; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- area picker: themed tiles instead of a dropdown ---- */
.lg-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: .55rem; }
.lg-area { position: relative; overflow: hidden; isolation: isolate; display: grid; align-content: space-between; gap: .5rem; min-height: 5.2rem; padding: .6rem .7rem; text-align: left; cursor: pointer; font: inherit; color: #efe6cf;
  border-radius: 12px; border: 1px solid color-mix(in srgb, var(--a1) 40%, rgba(255,255,255,.1));
  background: radial-gradient(ellipse 70% 130% at 100% 0%, color-mix(in srgb, var(--a1) 24%, transparent), transparent 70%), linear-gradient(110deg, color-mix(in srgb, var(--a2) 92%, #000), rgba(8,9,10,.92) 90%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 6px rgba(0,0,0,.35); transition: border-color .18s, box-shadow .2s, filter .18s; }
.lg-area::after { content: attr(data-glyph); position: absolute; right: .5rem; top: .1rem; z-index: -1; font-size: 3.2rem; line-height: 1; opacity: .18; pointer-events: none; }
.lg-area b { font-size: .95rem; text-shadow: 0 1px 5px rgba(0,0,0,.6); }
.lg-area:hover { border-color: var(--a1); filter: brightness(1.12); }
.lg-area.on { border-color: var(--a1); box-shadow: 0 0 0 1px var(--a1), 0 6px 18px color-mix(in srgb, var(--a1) 28%, transparent); }
.lg-area.on::before { content: "✓"; position: absolute; top: .4rem; right: .5rem; width: 1.2rem; height: 1.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--a1); color: #0a0a0a; font-size: .78rem; font-weight: 700; }
.lg-area-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.lg-area-tags em { font-style: normal; font-size: .72rem; padding: .1rem .5rem; border-radius: 999px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.14); color: #d8cdb4; }
.lg-area-tags em.risk { border-color: rgba(208,115,90,.8); color: #f0b09c; background: rgba(208,115,90,.18); }
.lg-area-tags em.ok { display: none; }
.lg-area.risky:not(.on) { filter: saturate(.8); }
.lg-fields .lg-pickfield { flex: 1 1 100%; }

/* ---- booking layout: mercenaries | places | reward and chances, all top-aligned; places at half height ---- */
.lg-bookrow { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(17rem, 24rem); gap: .8rem 1rem; align-items: start; }
.lg-bookrow .lg-fields { display: contents; }
.lg-bookrow .lg-pickfield { flex: none; grid-column: auto; align-self: start; }
.lg-bookrow .lg-pubcol { grid-column: 3; grid-row: 1 / span 3; align-self: start; }
.lg-bookrow .lg-pubcol .lg-pub { margin: 0; }
.lg-bookrow .lg-pubcol .lg-chances { max-width: none; }
.lg-bookrow .lg-pubcol .lg-ch { grid-template-columns: minmax(7rem, 9.5rem) minmax(3rem, 1fr) 2.8rem; gap: .5rem; padding: .35rem .6rem; font-size: .84rem; }
.lg-bookrow .lg-areafield { grid-column: 2; }
.lg-bookrow .lg-fields > :not(.lg-pickfield):not(.lg-areafield) { grid-column: 2; }
.lg-pick { flex-wrap: nowrap; align-items: flex-start; }
.lg-pickcard { align-self: flex-start; }
.lg-areas { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .4rem; }
.lg-area { min-height: 2.6rem; padding: .35rem .6rem; gap: .15rem; align-content: center; }
.lg-area b { font-size: .86rem; }
.lg-area::after { font-size: 2rem; top: -.1rem; }
.lg-area-tags em { font-size: .68rem; padding: 0 .4rem; }
@media (max-width: 1100px) {
  .lg-bookrow { grid-template-columns: 1fr; }
  .lg-bookrow .lg-pubcol, .lg-bookrow .lg-areafield { grid-column: 1; grid-row: auto; }
}

/* switching mission type / length / mercenary updates in place; while a not-yet-cached one loads the page just dims */
.lg-book.lg-stale { opacity: .55; pointer-events: none; transition: opacity .15s; }
.lg-book { transition: opacity .15s; }

/* the mission length buttons fill the gap under the mercenaries and locations, beside the reward block */
.lg-bookrow .lg-durs { grid-column: 1 / 3; grid-row: 2; align-self: start; margin: 0; }
@media (max-width: 1100px) { .lg-bookrow .lg-durs { grid-column: 1; grid-row: auto; } }

/* length buttons: only as wide as the mercenary cards; locations stack down the middle, three in view, then scroll */
.lg-bookrow { grid-template-columns: max-content minmax(11rem, 1fr) minmax(17rem, 24rem); }
.lg-bookrow .lg-durs { grid-column: 1; grid-row: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
.lg-bookrow .lg-durs > * { padding: .5rem .3rem; font-size: .8rem; min-width: 0; }
.lg-bookrow .lg-areafield { grid-column: 2; grid-row: 1 / span 2; }
.lg-bookrow .lg-areas { grid-template-columns: 1fr; max-height: calc(3 * 2.6rem + 2 * .4rem + .3rem); overflow-y: auto; padding-right: .3rem; scrollbar-width: thin; scrollbar-color: #5b6b62 transparent; }
.lg-bookrow .lg-areas::-webkit-scrollbar { width: 6px; } .lg-bookrow .lg-areas::-webkit-scrollbar-thumb { background: #5b6b62; border-radius: 3px; }
@media (max-width: 1100px) { .lg-bookrow { grid-template-columns: 1fr; } .lg-bookrow .lg-areafield, .lg-bookrow .lg-durs { grid-column: 1; grid-row: auto; } }
.lg-bookrow .lg-areas { max-height: calc(6 * 2.6rem + 5 * .4rem + .3rem); }

.lg-area-tags em.dg { border-color: color-mix(in srgb, var(--a1) 55%, transparent); color: color-mix(in srgb, var(--a1) 70%, #fff); }

.lg-confirm { width: 100%; margin-top: .7rem; padding: .75rem 1rem; font-weight: 700; letter-spacing: .04em; text-align: center; }

/* mission trail: a treasure-map route drawn out to the mission's progress */
.lg-trail { position: relative; height: 84px; margin: .1rem 0 .3rem; }
.lg-trail > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lg-trail > svg:not(.lg-m-decor) path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.lg-trail-ghost { stroke: rgba(255,255,255,.16); stroke-width: 2; stroke-dasharray: 2 7; }
.lg-trail-line { stroke: var(--a1, #d9c38a); stroke-width: 2.6; stroke-dasharray: 9 6; transition: clip-path 1.2s ease; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.lg-trail.run .lg-trail-line { animation: lgMarch 1.1s linear infinite; }
@keyframes lgMarch { to { stroke-dashoffset: -30; } }
.lg-x { position: absolute; transform: translate(-50%, -50%) scale(.6); font-size: .95rem; font-weight: 700; line-height: 1; color: rgba(255,255,255,.28);
  transition: transform .5s cubic-bezier(.3,1.6,.5,1), color .5s; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.lg-x.start { font-size: .7rem; }
.lg-x.end { font-size: 1.25rem; }
.lg-x.hit { color: #e0604a; transform: translate(-50%, -50%) scale(1.15) rotate(-6deg); transition-delay: var(--d, 0ms); }
.lg-x.hit.start { color: var(--a1, #d9c38a); }
.lg-trail-head { position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--a1, #d9c38a);
  box-shadow: 0 0 0 2px rgba(0,0,0,.45); transition: left 1.2s ease; }
.lg-trail-head.run { animation: lgPulse 1.6s ease-in-out infinite; }
@keyframes lgPulse { 0%,100% { box-shadow: 0 0 0 2px rgba(0,0,0,.45), 0 0 0 0 rgba(255,255,255,.5); } 50% { box-shadow: 0 0 0 2px rgba(0,0,0,.45), 0 0 0 8px rgba(255,255,255,0); } }
@media (prefers-reduced-motion: reduce) { .lg-trail.run .lg-trail-line, .lg-trail-head.run { animation: none; } }

/* trail scenery */
.lg-tree { position: absolute; width: 20px; height: 14px; transform: translate(-50%, -50%) scale(var(--s, 1)); pointer-events: none; }
.lg-tree b { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #86b574, #4d7a4a 70%, #355a38); box-shadow: 0 1px 2px rgba(0,0,0,.5); }
.lg-tree b:nth-child(1) { width: 11px; height: 11px; left: 0; top: 3px; }
.lg-tree b:nth-child(2) { width: 12px; height: 12px; left: 6px; top: 0; }
.lg-tree b:nth-child(3) { width: 9px; height: 9px; left: 11px; top: 5px; background: radial-gradient(circle at 35% 30%, #74a266, #3f6a40 70%, #2d4c30); }
.lg-sc { position: absolute; transform: translate(-50%, -50%); font-size: .8rem; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.7); cursor: help; animation: lgSceneIn .5s ease both; }
.lg-sc.fight { color: #e0604a; } .lg-sc.water { color: #8fb6d8; font-weight: 700; } .lg-sc.ruin { color: #c8c0a8; } .lg-sc.cave { color: #a89478; font-size: 1rem; }
.lg-sc.hill { color: #b6a67c; } .lg-sc.find { color: #f0c778; } .lg-sc.road { color: #b99a6a; }
.lg-fire { display: block; width: 9px; height: 13px; border-radius: 50% 50% 45% 45% / 70% 70% 30% 30%; transform-origin: 50% 100%;
  background: radial-gradient(ellipse at 50% 75%, #fff3b0 0 22%, #ffb23c 45%, #e8591c 75%, transparent 78%); box-shadow: 0 0 8px 2px rgba(255,140,40,.5);
  animation: lgFlicker .9s ease-in-out infinite alternate; }
.lg-fire::after { content: ""; position: absolute; left: -3px; right: -3px; bottom: -3px; height: 3px; border-radius: 2px; background: #5a4126; }
@keyframes lgFlicker { 0% { transform: scale(1, 1) rotate(-3deg); } 50% { transform: scale(.9, 1.15) rotate(2deg); } 100% { transform: scale(1.05, .92) rotate(-1deg); } }
@keyframes lgSceneIn { from { opacity: 0; transform: translate(-50%, -30%) scale(.5); } }
@media (prefers-reduced-motion: reduce) { .lg-fire, .lg-sc { animation: none; } }

/* trail v2: land of the zone, walking mercenary */
.lg-trail { margin: .2rem 0 .5rem; border-radius: 10px; margin-top: 2.2rem; background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(0,0,0,.18)); }
.lg-trail.t-bog { background: linear-gradient(180deg, rgba(90,100,50,.10), rgba(20,26,14,.35)); }
.lg-trail.t-snow { background: linear-gradient(180deg, rgba(220,235,245,.10), rgba(120,150,170,.12)); }
.lg-trail.t-fire { background: linear-gradient(180deg, rgba(200,70,20,.10), rgba(40,10,6,.4)); }
.lg-trail.t-coast { background: linear-gradient(180deg, rgba(80,150,200,.10), rgba(10,40,70,.3)); }
.lg-trail.t-cave, .lg-trail.t-crypt { background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.45)); }
.lg-art { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.lg-art svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.lg-art.ground svg { filter: none; opacity: .9; }
.lg-trail-walker { position: absolute; width: 34px; height: 46px; transform: translate(-50%, -88%); transition: left 1.2s ease, top 1.2s ease; z-index: 3; pointer-events: none; }
.lg-trail-walker canvas { width: 100% !important; height: 100% !important; object-fit: contain; display: block; }
.lg-trail-walker:not([hidden]) ~ .lg-trail-head { display: none; }
.lg-trail-walker[hidden] { display: none; }
.lg-trail-walker::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: -2px; height: 5px; border-radius: 50%; background: rgba(0,0,0,.35); z-index: -1; }
.lg-sc { z-index: 2; }

/* trail v3: a fantasy map - parchment, other roads and rivers, and ours one of them */
.lg-trail.map { --ink: #3b2a14; border-radius: 6px; height: 84px;
  background: radial-gradient(ellipse at 28% 25%, #d8c898 0, #bfa971 55%, #8f7b4c 100%);
  box-shadow: inset 0 0 0 1px #5e4a28, inset 0 0 0 4px rgba(206,186,130,.55), inset 0 0 0 5px #5e4a28, inset 0 0 26px rgba(70,45,10,.55); }
.lg-trail.map > svg { z-index: 1; }
.lg-m-river { stroke: #5d86a3; stroke-width: 4.5; opacity: .85; }
.lg-m-road { stroke: #5b4423; stroke-width: 1.5; stroke-dasharray: 5 3; opacity: .7; }
.lg-m-road.major { stroke-dasharray: none; stroke-width: 2.4; opacity: .55; }
.lg-trail.map .lg-trail-ghost { stroke: #3b2a14; stroke-width: 3; stroke-dasharray: 9 6; opacity: .5; }
.lg-trail.map .lg-trail-line { stroke: #8a1d12; stroke-width: 3.4; filter: drop-shadow(0 0 1px rgba(255,236,190,.7)); }
.lg-trail.map .lg-art svg, .lg-trail.map .lg-tree { filter: sepia(.85) saturate(.7) brightness(.62) contrast(1.15); opacity: .92; }
.lg-trail.map .lg-art.ground svg { opacity: .55; }
.lg-trail.map .lg-sc { color: var(--ink); text-shadow: none; z-index: 2; }
.lg-trail.map .lg-sc.fight { color: #8a1d12; } .lg-trail.map .lg-sc.find { color: #7a4a00; }
.lg-trail.map .lg-fire { box-shadow: 0 0 5px 1px rgba(255,140,40,.4); }
.lg-trail.map .lg-x { color: rgba(59,42,20,.5); text-shadow: none; }
.lg-trail.map .lg-x.hit { color: #8a1d12; }
.lg-trail.map .lg-trail-head { background: #8a1d12; box-shadow: 0 0 0 2px #ead9a8; }
.lg-map-title { position: absolute; left: 14px; bottom: 6px; z-index: 2; font: italic 600 .78rem/1 Georgia, "Times New Roman", serif; color: var(--ink, #3b2a14);
  letter-spacing: .08em; text-shadow: 0 0 4px rgba(236,222,176,.9); pointer-events: none; }
.lg-map-rose { position: absolute; right: 38px; top: 8px; width: 22px; height: 22px; z-index: 2; pointer-events: none; opacity: .75;
  background: conic-gradient(from 0deg, #3b2a14 0 6deg, transparent 6deg 84deg, #3b2a14 84deg 96deg, transparent 96deg 174deg, #3b2a14 174deg 186deg, transparent 186deg 264deg, #3b2a14 264deg 276deg, transparent 276deg 354deg, #3b2a14 354deg);
  -webkit-mask: radial-gradient(circle, #000 0 28%, transparent 30% 100%), radial-gradient(circle, transparent 0 62%, #000 64% 70%, transparent 72%);
  -webkit-mask-composite: source-over; border-radius: 50%; }
.lg-map-rose::after { content: "N"; position: absolute; left: 50%; top: -8px; transform: translateX(-50%); font: 700 .55rem/1 Georgia, serif; color: var(--ink, #3b2a14); }

/* trail v4: an inked chart on warm, creased parchment (torn edge set in script) */
.lg-trail.map { --ink: #1b1209; border-radius: 0; margin-top: 2.2rem; box-shadow: none;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .2  0 0 0 0 .05  0 0 0 .32 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    radial-gradient(ellipse at 38% 42%, #ecc680 0, #dcaa5e 55%, #bf8a40 100%); }
.lg-trail.map > svg.lg-m-decor { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.lg-trail.map > svg { z-index: 1; }
.lg-trail.map > svg.lg-m-decor { z-index: 0; }
.lg-m-river { stroke: #1b1209; stroke-width: 1.1; opacity: .75; }
.lg-m-road { stroke: #1b1209; stroke-width: 1.3; stroke-dasharray: 1 3.4; stroke-linecap: round; opacity: .8; }
.lg-m-road.major { stroke-dasharray: 5 2.5 1 2.5; stroke-width: 1.4; opacity: .75; }
.lg-trail.map .lg-trail-ghost { stroke: #1b1209; stroke-width: 2.2; stroke-dasharray: 2 4.5; opacity: .75; }
.lg-trail.map .lg-trail-line { stroke: #9b1608; stroke-width: 3.2; stroke-dasharray: 7 4; filter: drop-shadow(0 0 1px rgba(255,236,190,.8)); }
.lg-trail.map .lg-sc { color: #1b1209; }
.lg-trail.map .lg-x { color: rgba(27,18,9,.55); }
.lg-trail.map .lg-x.hit { color: #9b1608; }
.lg-map-title { left: auto; right: 16px; bottom: 5px; font: 600 .8rem/1 Georgia, "Times New Roman", serif; font-style: normal; text-transform: uppercase;
  letter-spacing: .5em; color: #1b1209; text-shadow: 0 0 4px rgba(236,200,130,.9); }
.lg-map-rose { position: absolute; left: 12px; bottom: 4px; right: auto; top: auto; width: 34px; height: 36px; z-index: 2; opacity: .9; background: none; -webkit-mask: none; border-radius: 0; pointer-events: none; }
.lg-map-rose::after { content: none; }
.lg-map-scale { position: absolute; left: 54px; bottom: 6px; z-index: 2; display: flex; flex-direction: column; gap: 1px; pointer-events: none; }
.lg-map-scale i { display: block; width: 60px; height: 4px; border: 1px solid #1b1209; border-top: 0;
  background: linear-gradient(90deg, #1b1209 0 25%, transparent 25% 50%, #1b1209 50% 75%, transparent 75%); }
.lg-map-scale b { font: italic .55rem/1 Georgia, serif; color: #1b1209; }
.lg-trail.map > svg.lg-map-rose { inset: auto; left: 12px; bottom: 4px; width: 34px; height: 36px; }

/* other characters' queued missions: same account queue, drawn at half strength on every schedule */
.lg-oblock { opacity: .5; cursor: help; pointer-events: auto; }
.lg-oblock:hover { opacity: .75; }
.lg-owho { opacity: .6; }
.lg-owho .lg-cwho-txt { padding-left: .9rem; }

/* trail v5: the route is a black line, drawn only as far as the mission has gone */
.lg-trail.map .lg-trail-line { stroke: #1b1209; stroke-width: 3; stroke-dasharray: 8 4; filter: drop-shadow(0 0 1px rgba(255,236,190,.7)); }
.lg-trail.map .lg-x.hit, .lg-trail.map .lg-x.hit.start { color: #1b1209; }
.lg-trail.map .lg-x:not(.hit) { visibility: hidden; }
.lg-trail.map .lg-trail-head { background: #1b1209; box-shadow: 0 0 0 2px #ead9a8; }

/* map points of interest: one inked badge per notable field-note entry, where in the journey it happened */
.lg-trail.map .lg-sc { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; z-index: 4; cursor: help;
  background: radial-gradient(circle at 35% 30%, #f6dfa6, #e2bb70); border: 1.3px solid #1b1209; box-shadow: 0 1px 3px rgba(40,20,0,.55);
  font-size: 0; animation: lgSceneIn .5s ease both; }
.lg-trail.map .lg-sc svg { width: 15px; height: 15px; display: block; }
.lg-trail.map .lg-sc:hover { transform: translate(-50%, -50%) scale(1.25); z-index: 6; }
.lg-trail.map .lg-sc.star { background: radial-gradient(circle at 35% 30%, #fff1b8, #f0c24a); }
.lg-trail.map .lg-sc.skull { background: radial-gradient(circle at 35% 30%, #e9c0a0, #c9784a); }

/* the torn paper is its own layer, so the walking mercenary and the badges may overhang its edge */
.lg-trail.map { background: none !important; clip-path: none; overflow: visible; }
.lg-map-paper { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .2  0 0 0 0 .05  0 0 0 .32 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    radial-gradient(ellipse at 38% 42%, #ecc680 0, #dcaa5e 55%, #bf8a40 100%); }
.lg-map-paper > svg.lg-m-decor { position: absolute; inset: 0; width: 100%; height: 100%; }
.lg-trail-walker { z-index: 5; }

/* Training Yard artwork: save the picture as images/guild/train.webp */
.lg-duty[data-duty="train"], .d-train .lg-ic-in, .lg-block.d-train .lg-glyph { background-image: url(../images/guild/train.webp); }
.d-train.lg-cblock .lg-cart, .d-train.lg-bcard .lg-cart { background-image: url(../images/guild/train.webp); }
.lg-area[data-area="training-yard"] { background-image: linear-gradient(90deg, rgba(8,8,10,.78), rgba(8,8,10,.25)), url(../images/guild/train.webp); background-size: cover; background-position: center; }

/* trail v6: ink markers (no badges), a fantasy frame, no compass or scale */
.lg-map-rose, .lg-map-scale { display: none !important; }
.lg-trail.map .lg-sc { width: 20px; height: 20px; background: none; border: 0; box-shadow: none; border-radius: 0; }
.lg-trail.map .lg-sc svg { width: 20px; height: 20px; overflow: visible;
  filter: drop-shadow(0 0 1.5px #f3dca0) drop-shadow(0 0 1px #f3dca0) drop-shadow(0 1px .5px rgba(60,35,5,.35)); }
.lg-trail.map .lg-sc:hover { transform: translate(-50%, -50%) scale(1.3); }
.lg-trail.map .lg-sc.star, .lg-trail.map .lg-sc.skull { background: none; }
.lg-map-frame { position: absolute; inset: 7px; z-index: 3; pointer-events: none; border: 2px solid #1b1209;
 }
.lg-map-frame::before { content: ""; position: absolute; inset: 4px; border: 1px solid #1b1209; }
.lg-map-frame::after { content: ""; position: absolute; inset: 8px; border: 1px dotted rgba(27,18,9,.55); }
.lg-fr-c { position: absolute; width: 26px; height: 26px; }
.lg-fr-c.tl { left: -3px; top: -3px; }
.lg-fr-c.tr { right: -3px; top: -3px; transform: scaleX(-1); }
.lg-fr-c.bl { left: -3px; bottom: -3px; transform: scaleY(-1); }
.lg-fr-c.br { right: -3px; bottom: -3px; transform: scale(-1, -1); }
.lg-fr-t, .lg-fr-b { position: absolute; left: 34px; right: 34px; height: 5px; opacity: .8;
  background: repeating-linear-gradient(90deg, #1b1209 0 1px, transparent 1px 7px); }
.lg-fr-t { top: 2px; } .lg-fr-b { bottom: 2px; }
.lg-trail.map .lg-map-title { right: 24px; bottom: 14px; z-index: 4; }

/* the ruled frame was dropped: it did not suit the map */
.lg-map-frame { display: none !important; }
.lg-trail.map .lg-map-title { right: 18px; bottom: 8px; }

/* trail v7: the illustrated chart - a tan road with dark edges, drawn only as far as the mission has gone */
.lg-trail { height: 120px; }
.lg-trail.map { height: 120px; margin-top: 2.6rem; }
.lg-trail.map .lg-trail-line { stroke: #f1d69a; stroke-width: 5; stroke-dasharray: none; stroke-linecap: round;
  filter: drop-shadow(0 0 .6px #2b2112) drop-shadow(0 0 .6px #2b2112) drop-shadow(0 1px 0 rgba(43,33,18,.55)); }
.lg-trail.map .lg-x { color: rgba(43,33,18,.55); }
.lg-trail.map .lg-x.hit { color: #7b1c10; }
.lg-trail.map .lg-trail-head { background: #7b1c10; }
.lg-trail.map .lg-map-title { right: 18px; bottom: 8px; color: #2b2112; }

/* a drawn map: the picture is the background, our progress is a dark road laid over its own road */
.lg-trail.map.pic { height: auto; background-size: 100% 100% !important; background-repeat: no-repeat !important; background-color: transparent; margin-top: 2.6rem; clip-path: none; overflow: visible;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.55)); }
.lg-trail.map.pic > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lg-trail.map.pic .lg-trail-line { stroke: #5b3a12; stroke-width: 3.2; stroke-dasharray: none; stroke-linecap: round;
  filter: drop-shadow(0 0 1px rgba(255,236,190,.85)); }
.lg-trail.map.pic .lg-x { color: rgba(43,33,18,.7); }
.lg-trail.map.pic .lg-x.hit { color: #7b1c10; }

.lg-trail.map.pic { background-image: var(--map-img) !important; }

/* The original painted Guild chart remains the visual language for surface work. */
.lg-trail.map.illustrated { height: auto; aspect-ratio: 7.8; background: none !important;
  margin-top: 2.6rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,.55)); }
.lg-map-illust { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--map-img); background-repeat: no-repeat; }
.lg-map-illust.flipped { transform: scaleX(-1); }
.lg-trail.map.illustrated .lg-trail-line { opacity: 0; }
.lg-trail.map.illustrated .lg-x.hit { color: #fff8db; text-shadow: 0 0 4px #5b300b, 0 1px 2px #000; }
.lg-trail.map.illustrated .lg-trail-head { background: #fff6ca; box-shadow: 0 0 0 2px #6f3812; }

/* Exploration below ground uses the exported, top-down NWN area map. */
.lg-trail.map.dungeon { height: 210px; background: #090908 !important; overflow: hidden;
  border: 1px solid #62543c; box-shadow: inset 0 0 22px #000, 0 4px 12px #0009; }
.lg-dungeon-floor { position: absolute; inset: 0; background-image: var(--map-img);
  background-size: cover; background-position: center; filter: brightness(.9) contrast(1.08); opacity: .45; }
.lg-trail.map.dungeon > svg { z-index: 1; }
.lg-trail.map.dungeon > svg.lg-dungeon-plan { z-index: 0; opacity: .88; }
.lg-trail.map.dungeon .lg-trail-line { stroke: #d6a65f; stroke-width: 3;
  stroke-dasharray: 6 5; filter: drop-shadow(0 0 3px #080604); }
.lg-trail.map.dungeon .lg-x.hit { color: #edc479; text-shadow: 0 1px 4px #000; }
.lg-trail.map.dungeon .lg-trail-head { background: #e8be72; }
.lg-trail.map.dungeon .lg-map-title { color: #f1dfbc; background: #0b0909cc;
  padding: 4px 7px; letter-spacing: .12em; text-shadow: 0 1px 3px #000; }
.lg-trail.map.dungeon .lg-sc svg { filter: drop-shadow(0 0 2px #efd299); }
.lg-trail.map.dungeon .lg-trail-walker { width: 46px; height: 60px; }
.lg-trail.map.dungeon.traced { height: auto; min-height: 0; overflow: visible; background: #050505 !important; }
.lg-dungeon-stage { position: relative; width: min(100%, 460px); aspect-ratio: 1; margin: auto; overflow: hidden; background: #050505; }
.lg-trail.map.dungeon.traced .lg-dungeon-floor { background-size: 100% 100%; background-position: center; opacity: 1; filter: none; }
.lg-dungeon-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.lg-trail.map.dungeon.traced .lg-trail-line { stroke-width: 1.4; stroke-dasharray: none; }
.lg-battle-shade { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, #02040333 5%, #020403c9 100%); }
.lg-battle-note { position: absolute; top: 9px; left: 10px; z-index: 7;
  padding: 3px 7px; color: #f1dfbc; background: #0b0909d9; border: 1px solid #9b8052;
  font: 600 .7rem/1.2 Georgia, serif; letter-spacing: .08em; text-transform: uppercase; }
.lg-battle-monster { position: absolute; left: 58%; top: 48%; z-index: 6;
  width: 120px; height: 120px; transform: translate(-50%, -50%); pointer-events: none; }
.lg-battle-monster canvas { display: block; width: 100% !important; height: 100% !important; }
.lg-trail.map.dungeon.battle .lg-trail-walker { left: 40% !important; top: 59% !important;
  width: 95px; height: 125px; transition: none; animation: lgMercStrike 7s ease-in-out both; }
.lg-trail.map.dungeon.battle.loss .lg-trail-walker { animation: lgMercFall 7s ease-in-out both; }
.lg-trail.map.dungeon.battle .lg-trail-head { display: none; }
.lg-trail.map.dungeon.battle .lg-trail-walker::after { bottom: 6px; }
@keyframes lgMercStrike { 0%, 100% { transform: translate(-50%, -70%); } 20%, 45% { transform: translate(-33%, -70%); } 34%, 60% { transform: translate(-51%, -70%); } }
@keyframes lgMercFall { 0%, 38%, 100% { transform: translate(-50%, -70%) rotate(0); } 53%, 72% { transform: translate(-50%, -40%) rotate(83deg); } }
.lg-trail.map.t-sea .lg-map-paper { background: #8db2ad; }
.lg-trail.map.t-yard .lg-map-paper { background: #c4a477; }
@media (max-width: 650px) { .lg-trail.map.dungeon:not(.traced) { height: 165px; } }
@media (prefers-reduced-motion: reduce) { .lg-trail.map.dungeon .lg-trail-line, .lg-trail.map.dungeon.battle .lg-trail-walker { animation: none; } }

.lg-cancel-top { margin-left: .5rem; padding: .25rem .65rem; font-size: .74rem; white-space: nowrap; }
