.jt-screen {
    --jt-gold: #ffd700;
    --jt-jade: #4ecdc4;
    --jt-panel: #111a27;
    --jt-panel-2: #0d1520;
    --jt-line: rgba(201, 162, 39, 0.28);
    margin-bottom: 16px;
    border: 1px solid var(--jt-line);
    border-radius: 14px;
    background: linear-gradient(180deg, #121c2a, #0c141e);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: clip;
    container-type: inline-size;
    container-name: jinti;
    color: var(--ui-text);
    font-size: 14px;
}
.jt-screen * { box-sizing: border-box; }
.jt-px { image-rendering: pixelated; display: inline-block; vertical-align: middle; object-fit: contain; }

.jt-head { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--jt-line); flex-wrap: wrap; }
.jt-head h2 { margin: 0; font-size: 26px; font-weight: 700; color: #f5e6b0; letter-spacing: 0.5px; font-family: Georgia, serif; }
.jt-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; flex: 1; }
.jt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--ui-border-strong); border-radius: 8px; background: var(--jt-panel-2); color: var(--ui-text-dim); font-size: 13px; }
.jt-chip b { color: var(--ui-text); font-weight: 600; white-space: nowrap; }
.jt-chip--gold { border-color: rgba(255, 215, 0, 0.35); color: #f5e6b0; }
.jt-head-actions { display: flex; align-items: center; gap: 8px; }

.jt-btn { font: inherit; font-size: 13px; padding: 8px 14px; border-radius: 8px; cursor: pointer; border: 1px solid var(--ui-border-strong); background: var(--jt-panel-2); color: var(--ui-text); min-height: 36px; }
.jt-btn:hover:not([disabled]) { border-color: var(--jt-jade); }
.jt-btn--gold { border-color: rgba(255, 215, 0, 0.6); color: #ffe27a; background: linear-gradient(180deg, rgba(255, 215, 0, 0.14), rgba(255, 215, 0, 0.04)); font-weight: 600; }
.jt-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.jt-strip { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--jt-line); flex-wrap: wrap; }
.jt-strip__title { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ui-text-mute); margin-right: 6px; }
.jt-strip__arrow { color: var(--ui-text-mute); }
.jt-step { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; border: 1px solid var(--ui-border-strong); background: var(--jt-panel-2); color: var(--ui-text-dim); font: inherit; cursor: pointer; opacity: 0.55; }
.jt-step span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.jt-step b { font-size: 11.5px; color: var(--ui-text); font-weight: 600; }
.jt-step em { font-style: normal; font-size: 11px; color: var(--el); }
.jt-step.is-done { opacity: 1; border-color: color-mix(in srgb, var(--el) 55%, transparent); }
.jt-step.is-next { opacity: 1; border-color: var(--jt-gold); box-shadow: 0 0 12px rgba(255, 215, 0, 0.18); }
.jt-step.is-selected { outline: 2px solid rgba(78, 205, 196, 0.6); outline-offset: 2px; }

.jt-main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px; }
.jt-network { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px) minmax(0, 1fr); gap: 10px; align-items: center; border: 1px solid rgba(78, 205, 196, 0.16); border-radius: 12px; background: radial-gradient(ellipse at 50% 45%, rgba(20, 60, 64, 0.5), rgba(8, 14, 22, 0.9) 70%); padding: 12px; min-height: 520px; }
.jt-rails { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.jt-rail { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--ui-border-strong); background: rgba(13, 21, 32, 0.92); color: var(--ui-text); font: inherit; cursor: pointer; min-width: 0; }
.jt-rail__icon { width: 46px; height: 46px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, color-mix(in srgb, var(--el) 25%, transparent), transparent 70%); }
.jt-rail__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.jt-rail__top { display: flex; align-items: center; gap: 6px; }
.jt-rail__top b { font-family: Georgia, serif; color: #f5e6b0; }
.jt-rail__meta { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--ui-text-dim); flex-wrap: wrap; }
.jt-rail__meta span { color: var(--el); }
.jt-rail--dormant, .jt-rail--sealed { opacity: 0.7; }
.jt-rail--dormant .jt-part-icon, .jt-rail--sealed .jt-part-icon { filter: grayscale(0.6) brightness(0.75); }
.jt-rail--ready { border-color: var(--jt-gold); }
.jt-rail--awake { border-color: color-mix(in srgb, var(--el) 50%, transparent); }
.jt-rail.is-selected { outline: 2px solid rgba(78, 205, 196, 0.7); outline-offset: 2px; opacity: 1; }
.jt-state { margin-left: auto; font-style: normal; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.8px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--ui-border-strong); color: var(--ui-text-dim); }
.jt-state--ready { border-color: var(--jt-gold); color: var(--jt-gold); }
.jt-state--awake { border-color: var(--el); color: var(--el); }

.jt-figure-wrap { display: flex; align-items: center; justify-content: center; height: 100%; }
.jt-body { width: 100%; max-height: 520px; overflow: visible; }
.jt-figure { image-rendering: pixelated; }
.jt-figure.is-golden { filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.75)) sepia(0.35) saturate(1.4); }
.jt-floor { fill: none; stroke: rgba(78, 205, 196, 0.25); stroke-width: 1.5; }
.jt-aura { opacity: 0; }
.jt-aura--awake { opacity: 1; }
.jt-aura--ready { opacity: 0.45; }
.jt-node { color: var(--el); cursor: pointer; }
.jt-node__glow { fill: url(#jtNode); opacity: 0.25; }
.jt-node__core { fill: var(--el); stroke: #0b121c; stroke-width: 2; }
.jt-node__ring { fill: none; stroke: var(--el); stroke-width: 2; opacity: 0; }
.jt-node--sealed .jt-node__core { fill: #2a3442; stroke: #59667a; }
.jt-node--dormant .jt-node__core { opacity: 0.55; }
.jt-node--ready .jt-node__glow { opacity: 0.6; }
.jt-node--awake .jt-node__glow { opacity: 0.85; }
.jt-node.is-selected .jt-node__ring { opacity: 1; }

.jt-card { border: 1px solid var(--ui-border-strong); border-radius: 12px; background: var(--jt-panel); padding: 12px 14px; }
.jt-card h3 { margin: 0 0 8px; font-size: 15px; color: #f5e6b0; font-family: Georgia, serif; text-align: center; }
.jt-card--sel { border-color: color-mix(in srgb, var(--el) 40%, transparent); }
.jt-sel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.jt-sel-head h3 { margin: 0; font-size: 20px; text-align: left; }
.jt-sel-head span { display: inline-flex; align-items: center; gap: 4px; color: var(--ui-text-dim); font-size: 12px; flex-wrap: wrap; }
.jt-resist { margin-left: auto; display: flex; flex-direction: column; align-items: center; font-size: 20px; color: var(--el); }
.jt-resist small { font-size: 11px; color: var(--ui-text-dim); font-weight: 400; }
.jt-note { margin: 6px 0; color: var(--ui-text-dim); font-size: 12.5px; line-height: 1.45; text-align: center; }

.jt-bar { height: 6px; border-radius: 999px; background: #1c2a39; overflow: hidden; }
.jt-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--jt-jade), var(--jt-gold)); }
.jt-bar--el i { background: var(--el); }

.jt-reqs { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.jt-reqs li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 8px; background: var(--jt-panel-2); color: var(--ui-text-dim); font-size: 12.5px; border-left: 3px solid #3a4656; }
.jt-reqs li b { color: var(--ui-text); font-weight: 500; text-align: right; }
.jt-reqs li.is-ok { border-left-color: var(--jt-jade); }

.jt-btn--sm { padding: 3px 10px; font-size: 12px; }
.jt-fragment { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(78, 205, 196, 0.3); border-radius: 10px; background: rgba(0, 0, 0, 0.18); }
.jt-fragment__icon { display: inline-flex; flex: 0 0 auto; width: 40px; height: 40px; align-items: center; justify-content: center; }
.jt-fragment__icon svg { width: 40px; height: 40px; }
.jt-fragment__info { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 2px; }
.jt-fragment__info b { color: #f5e6b0; font-size: 14px; }
.jt-fragment__qty { font-size: 12px; color: var(--ui-text-dim); }
.jt-fragment__meta { font-size: 11px; color: var(--jt-jade); }
.jt-fragment__buy { display: flex; flex: 0 0 auto; gap: 6px; }
.jt-pop { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-start; padding: 14px; }
.jt-pop--right { justify-content: flex-end; }
.jt-pop .jt-sel-head { padding-right: 34px; }
.jt-pop--left { justify-content: flex-start; }
.jt-pop__backdrop { position: absolute; inset: 0; border-radius: 12px; background: rgba(5, 8, 14, 0.55); }
.jt-pop__panel { position: sticky; top: 60px; scroll-margin-top: 60px; z-index: 1; width: min(560px, 100%); max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--ui-border-strong); border-radius: 14px; background: #0d1520; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
.jt-pop__close { position: absolute; top: 8px; right: 10px; z-index: 2; width: 28px; height: 28px; border: 1px solid var(--ui-border-strong); border-radius: 8px; background: rgba(0, 0, 0, 0.3); color: var(--ui-text); font-size: 18px; line-height: 1; cursor: pointer; }

.jt-circuit { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--jt-line); flex-wrap: wrap; }
.jt-circuit > div { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 220px; text-align: center; }
.jt-circuit__title { color: var(--ui-text); }
.jt-circuit__sub { color: var(--ui-text-dim); font-size: 12.5px; }
.jt-dots { display: flex; gap: 6px; }
.jt-dots i { width: 28px; height: 6px; border-radius: 999px; background: #22303f; }
.jt-dots i.is-done { background: var(--el); }
.jt-dots i.is-next { background: transparent; box-shadow: inset 0 0 0 1px var(--jt-gold); }


.jt-circuit .jt-btn { flex: none; }
.jt-trial { margin: 0; padding: 16px; text-align: center; background: radial-gradient(ellipse at 50% 0%, rgba(255, 215, 0, 0.08), rgba(13, 21, 32, 0.98) 60%); }
.jt-trial h2 { margin: 0 0 6px; color: #f5e6b0; font-family: Georgia, serif; }
.jt-trial h3 { margin: 6px 0; color: #f5e6b0; font-family: Georgia, serif; }
.jt-trial__stage { position: relative; overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 8px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--el, #ffd700) 45%, transparent); background-color: #0b121c; background-size: cover; background-position: center 60%; background-repeat: no-repeat; image-rendering: pixelated; }
.jt-trial__stage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(5, 8, 14, 0.1), rgba(5, 8, 14, 0.5)); }
.jt-trial__stage.is-struck::after { background: linear-gradient(180deg, color-mix(in srgb, var(--el, #ffd700) 32%, transparent), rgba(5, 8, 14, 0.55)); }
.jt-trial__sigil { position: absolute; left: 0; right: 0; bottom: 34%; z-index: 2; display: none; width: 30%; margin: 0 auto; opacity: 0.55; line-height: 0; pointer-events: none; }
.jt-trial__sigil img { width: 100%; height: auto; image-rendering: pixelated; }
.jt-trial__stage.is-struck .jt-trial__sigil { display: block; }
.jt-trial__stage:is([data-scene="general"], [data-scene="physical"]) { background-image: radial-gradient(ellipse at 50% 72%, rgba(255, 215, 0, 0.38), rgba(46, 34, 8, 0.92) 58%, #0b0904); }
.jt-trial__aura { position: absolute; left: 50%; bottom: 22%; z-index: 2; width: 40%; height: 16%; transform: translateX(-50%); border-radius: 50%; pointer-events: none; background: radial-gradient(ellipse, color-mix(in srgb, var(--el, #ffd700) 55%, transparent), transparent 70%); }
.jt-trial__figure { position: absolute; left: 0; right: 0; bottom: 24%; z-index: 3; width: 26%; margin: 0 auto; line-height: 0; }
.jt-trial__figure > :is(svg, img, canvas) { width: 100%; height: auto; }
.jt-trial__count { color: var(--ui-text-dim); }
.jt-trial__count b { font-size: 30px; color: #f5e6b0; }
.jt-trial__hp { display: flex; align-items: center; gap: 10px; margin: 8px 0; color: var(--ui-text-dim); font-size: 12px; }
.jt-bar--hp { height: 12px; flex: 1; }
.jt-bar--hp i { background: linear-gradient(90deg, #ff6b6b, #ffb36b); transition: width 0.15s; }
.jt-trial__strike { padding: 8px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--el, #ffd700) 50%, transparent); color: var(--el, #f5e6b0); background: rgba(0, 0, 0, 0.25); min-height: 38px; }
.jt-trial__reasons { margin: 6px 0; padding: 0; list-style: none; color: #ffb36b; font-size: 12.5px; }
.jt-trial__result { margin-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.jt-rots { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 10px 0; }
.jt-rots > span:first-child { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--ui-text-mute); }
.jt-rot { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 4px; border-radius: 999px; border: 1px solid var(--ui-border-strong); color: var(--el); font-size: 12px; }
.jt-rot.is-next { border-color: var(--el); box-shadow: 0 0 10px color-mix(in srgb, var(--el) 40%, transparent); }
.jt-rot__p { width: 18px; text-align: center; }
.jt-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.jt-choice { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 10px; border-radius: 10px; border: 1px solid var(--ui-border-strong); background: var(--jt-panel-2); color: var(--ui-text); font: inherit; }
.jt-choice b { color: #f5e6b0; }
.jt-choice p { margin: 0; font-size: 12px; color: var(--ui-text-dim); line-height: 1.4; }
.jt-choice__kind { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--ui-text-mute); }
.jt-choice__state { font-size: 11px; color: var(--ui-text-mute); }
.jt-choice.is-chosen { border-color: var(--jt-gold); }
.jt-choice.is-chosen .jt-choice__state { color: var(--jt-gold); }
.jt-choice.is-other { opacity: 0.45; }
.jt-choice.is-locked { border-style: dashed; }
.jt-choice--pick { cursor: pointer; }
.jt-choice--pick:hover, .jt-choice--pick:focus-visible { border-color: var(--jt-gold); outline: none; }
.jt-auto { padding: 4px 2px; border: 0; box-shadow: none; background: transparent; display: flex; flex-direction: column; gap: 6px; }
.jt-auto-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ui-text); }
.jt-auto-row span { display: inline-flex; align-items: center; gap: 6px; }
.jt-auto-row span { flex: none; width: 130px; }
.jt-auto-row select { min-width: 0; flex: 1; }
.jt-auto-title { margin-top: 6px; text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ui-text-mute); }
.jt-auto-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.jt-auto-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ui-text); }
.jt-auto-check--wide { justify-content: center; margin-top: 6px; }
.jt-beats { text-align: left; color: var(--ui-text-dim); font-size: 13px; line-height: 1.6; margin: 10px auto 12px; max-width: 460px; padding-left: 20px; }
.jt-service__actions { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
    .jt-bar--hp i { transition: none; }
}

@container jinti (max-width: 1239px) {
    .jt-main { grid-template-columns: 1fr; }
}

@container jinti (max-width: 819px) {
    .jt-network { grid-template-columns: 1fr 1fr; min-height: 0; }
    .jt-figure-wrap { grid-column: 1 / -1; grid-row: 1; height: 420px; }
    .jt-body { max-height: 420px; }
    .jt-pop { justify-content: center; padding: 8px; }
}

@container jinti (max-width: 559px) {
    .jt-choices { grid-template-columns: 1fr; }
    .jt-head { padding: 10px; }
    .jt-chips { flex-basis: 100%; }
    .jt-strip__arrow { display: none; }
    .jt-network { grid-template-columns: 1fr; padding: 8px; }
    .jt-figure-wrap { height: 340px; }
    .jt-body { max-height: 340px; }
    .jt-btn { min-height: 44px; }
    .jt-main { padding: 8px; }
}
.structure-ui--panel:has(#bodyRefining > #bodyRefiningContent .jt-screen) .modal-inner.ui-modal { height: auto !important; }
.structure-ui--panel #bodyRefiningContent .jt-screen { margin-bottom: 0; }
