.jl-dialog {
  --jl-paper: #111627;
  --jl-stroke: #45516e;
  --jl-ink: #eff7ff;
  --jl-slate: #bfcee0;
  --jl-accent: #70f5e6;
  --jl-mono: 'IBM Plex Mono', 'Courier New', monospace;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(620px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--jl-stroke);
  border-radius: 4px;
  color: var(--jl-ink);
  background: var(--jl-paper);
  box-shadow: 0 24px 80px #05071399;
  text-align: left;
  color-scheme: dark;
}
.jl-dialog::backdrop { background: rgb(6 9 24 / 77%); }
.jl-dialog *, .jl-dialog *::before, .jl-dialog *::after { box-sizing: border-box; }
.jl-dialog [hidden] { display: none !important; }
.jl-dialog button, .jl-dialog input, .jl-dialog select { font: inherit; color: inherit; }
.jl-dialog button:not(:disabled), .jl-select, .jl-range { cursor: pointer; }
.jl-dialog :focus-visible { outline: 3px solid #ffc1e5; outline-offset: 3px; }
.jl-dialog h2:focus { outline: none; }
.jl-sheet { padding: 0; margin: 0; }
.jl-dialog:is([data-subject="trading"],[data-subject="travelling"]) { width: min(1060px, calc(100% - 20px)); }
.jl-dialog:is([data-subject="trading"],[data-subject="travelling"]) .jl-main { padding: clamp(12px,2.5vw,26px); }
.jl-dialog .jl-station-return { margin-top: 14px; }
.jl-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px 9px 25px;
  border-bottom: 1px solid #3e4d69;
}
.jl-kicker, .jl-label, .jl-readout, .jl-ticket-top {
  font-family: var(--jl-mono);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.jl-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--jl-accent); }
.jl-mark { font: bold 1.35rem/1 Georgia, serif; }
.jl-dialog .jl-x {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  font: 400 1.9rem/1 Arial,sans-serif;
}
.jl-x:hover { background: #29324a; }
.jl-main { padding: 24px clamp(20px, 5vw, 35px) 32px; }
.jl-main h2 {
  margin: 0;
  color: var(--jl-ink);
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 750;
  line-height: 1.07;
  text-transform: none;
  letter-spacing: -.055em;
}
#jl-intro, .jl-trade-controls p, .jl-about p, .jl-sample, .jl-verdict { font-size: 1rem; line-height: 1.55; }
#jl-intro { max-width: 52ch; margin: 12px 0 22px; color: var(--jl-slate); }
.jl-mono, .jl-dialog .jl-mono, .jl-scale, .jl-temp output, .jl-route-action { font-family: var(--jl-mono); }
.jl-lab { border: 1px solid var(--jl-stroke); border-radius: 8px; padding: clamp(15px, 3vw, 23px); background: #192237; }
.jl-label { display: block; line-height: 1.4; color: #dae2f3; }
.jl-input, .jl-select {
  display: block;
  width: 100%;
  min-height: 45px;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid #617690;
  border-radius: 4px;
  background-color: #101727;
  font-size: 1rem;
}
.jl-select { appearance: none; padding-right: 42px; background-image: linear-gradient(45deg,transparent 50%,#a2b8d1 51%), linear-gradient(135deg,#a2b8d1 50%,transparent 51%); background-position: calc(100% - 20px) center, calc(100% - 14px) center; background-size: 6px 6px; background-repeat: no-repeat; }
.jl-help { margin: 8px 0 18px; color: var(--jl-slate); font-size: .875rem; line-height: 1.5; }
.jl-help.jl-bottom { margin: 15px 0 0; }
.jl-terminal { padding: 14px; border-radius: 5px; background: #0b1322; color: #a6fff0; }
.jl-readout { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid #3b566b; font-size: .77rem; letter-spacing: .06em; color: #bfd4e5; }
.jl-readout span:last-child { text-transform: none; }
.jl-bytes { display: flex; flex-wrap: wrap; gap: 8px; min-height: 55px; padding-top: 14px; align-items: flex-start; font: .94rem/1.4 var(--jl-mono); overflow-wrap: anywhere; }
.jl-byte-group { display: grid; gap: 3px; padding: 4px 7px; background: #23394b; border-radius: 3px; }
.jl-glyph { color: #ffba90; font-size: .875rem; text-align: left; }
.jl-temp, .jl-chart-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jl-temp { margin-top: 20px; }
.jl-temp output, .jl-chart-top .jl-period { color: var(--jl-accent); font-size: .875rem; font-weight: 600; }
.jl-range { display: block; min-height: 28px; width: 100%; margin: 6px 0 0; padding: 0; accent-color: var(--jl-accent); }
.jl-scale { display: flex; justify-content: space-between; gap: 12px; font-size: .76rem; color: var(--jl-slate); }
.jl-probs { display: grid; gap: 6px; margin: 18px 0; }
.jl-prob { display: grid; grid-template-columns: minmax(82px, 1fr) minmax(40px, 1.65fr) 60px; align-items: center; gap: 8px; font-size: .94rem; line-height: 1.3; }
.jl-prob-track { width: 100%; height: 6px; background: #304158; border-radius: 2px; }
.jl-prob-track i { display: block; height: 100%; border-radius: inherit; background: #a79dd1; }
.jl-prob:first-child .jl-prob-track i { background: var(--jl-accent); }
.jl-prob > :last-child { text-align: right; font: .84rem/1.2 var(--jl-mono); }
.jl-dialog .jl-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 43px;
  padding: 9px 16px;
  border: 1px solid var(--jl-ink);
  border-radius: 5px;
  background: var(--jl-accent);
  border-color: var(--jl-accent);
  color: #0b1422;
  font-family: inherit;
  font-size: .94rem;
  font-weight: 600;
  line-height: 1.35;
}
.jl-dialog .jl-btn:hover { background: #bafff2; }
.jl-dialog .jl-secondary { background: transparent; color: var(--jl-ink); border-color: #637591; }
.jl-dialog .jl-secondary:hover { background: #24384b; }
.jl-sample, .jl-verdict, .jl-route-status { margin: 12px 0 0; font-weight: 600; color: var(--jl-accent); }
.jl-sample:empty, .jl-verdict:empty, .jl-route-status:empty { display: none; }
.jl-chart-top { flex-wrap: wrap; }
.jl-chart { margin-top: 10px; border-bottom: 1px dashed var(--jl-stroke); padding-bottom: 12px; }
.jl-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.jl-chart svg text { font: 10px var(--jl-mono); fill: #c4d0ea; }
.jl-grid { fill: none; stroke: #3f4c65; stroke-width: .7; }
.jl-zone { fill: #bca0f112; }
.jl-boundary { stroke: #8898b2; stroke-dasharray: 2 3; }
.jl-line { fill: none; stroke: #ea9ad2; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.jl-future { stroke: var(--jl-accent); }
.jl-now { fill: #ea9ad2; }
.jl-end { fill: var(--jl-accent); }
.jl-trade-controls p { margin: 16px 0 10px; }
.jl-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.jl-again { margin-top: 12px; }
.jl-routes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.jl-dialog .jl-route {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--jl-stroke);
  border-radius: 6px;
  background: #172137;
  text-align: left;
}
.jl-route[aria-pressed="true"] { outline: 2px solid var(--jl-accent); outline-offset: -2px; }
.jl-route:hover { border-color: var(--jl-accent); }
.jl-scenery { display: block; width: 100%; height: auto; border-bottom: 1px solid #46546a; }
.jl-route-name { display: block; margin: 11px 9px 3px; font-weight: 750; line-height: 1.25; }
.jl-route-desc { margin: 0 9px 12px; font-size: .875rem; line-height: 1.35; color: var(--jl-slate); }
.jl-route-action { width: 100%; margin-top: auto; border-top: 1px dashed var(--jl-stroke); padding: 9px; font-size: .8rem; font-weight: 600; color: var(--jl-accent); }
.jl-route-status { color: var(--jl-ink); font-size: .94rem; }
.jl-content [data-board] { margin-top: 14px; }
.jl-about { position: relative; padding: 20px 22px; background: #192137; border: 1px solid #4a566e; border-radius: 7px; }
.jl-ticket-top { display:flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px dashed #4c5975; color: var(--jl-accent); }
.jl-about p { margin: 11px 0; }
.jl-sign { margin-top: 18px; font: italic 1.6rem/1.1 Georgia, serif; }
@media (max-width: 520px) {
  .jl-dialog { max-height: calc(100dvh - 16px); width: calc(100% - 16px); }
  .jl-heading { padding: 5px 10px 5px 18px; }
  .jl-main { padding: 20px 16px; }
  .jl-routes { grid-template-columns: 1fr; gap: 8px; }
  .jl-dialog .jl-route { display: grid; grid-template-columns: 85px 1fr; grid-template-rows: auto auto auto; align-items: start; }
  .jl-route .jl-scenery { grid-column: 1; grid-row: 1 / 4; height: 100%; min-height: 77px; object-fit: cover; align-self: stretch; border: 0; border-right: 1px solid #46546a; background: #282641; }
  .jl-route-name, .jl-route-desc, .jl-route-action { grid-column: 2; }
  .jl-route-name { margin: 8px 10px 1px; }
  .jl-route-desc { margin: 0 10px 2px; }
  .jl-route-action { padding: 2px 10px 7px; border: 0; }
}
