/* 유령 정체 — 시안(docs/기획문서/시안/phantom-jam)에서 옮김. 전부 .exp-jam 아래로 범위를 좁힘. */
.exp-jam { --grid: #16203a; --gridhi: #24345c; --band: #070a14; --cyan: #46c6ff; --gold: #ffd23f; --red: #ff5a4f; --green: #5be3a0; --sub: #8fa0c8; --chip: #141b30; }
.exp-jam .lab { display: grid; grid-template-columns: 720px minmax(0, 1fr); gap: 22px; align-items: start; }
.exp-jam .stagecol { min-width: 0; }

/* 영상 Chip: 모서리를 깎은 납작한 칩 */
.exp-jam .chip { display: inline-flex; align-items: center; gap: .3em; font-weight: 700; font-size: var(--fs, 15px); color: var(--text); background: var(--chip); padding: .18em .4em; white-space: nowrap; line-height: 1.25;
  clip-path: polygon(.16em 0, calc(100% - .16em) 0, 100% .16em, 100% calc(100% - .16em), calc(100% - .16em) 100%, .16em 100%, 0 calc(100% - .16em), 0 .16em); }
.exp-jam .chip.red { background: var(--red); color: var(--bg); }
.exp-jam .chip.gold { background: var(--gold); color: var(--bg); }
.exp-jam .chip.green { background: var(--green); color: var(--bg); }
.exp-jam .g { color: var(--gold); }
.exp-jam .dot { display: inline-block; width: .8em; height: .8em; box-shadow: 2px 2px 0 #000; }

.exp-jam .band { background: var(--band); border-bottom: 3px solid var(--grid); padding: 8px 10px 9px; display: flex; flex-direction: column; align-items: center; gap: 7px; min-height: 76px; --fs: 16px; }
.exp-jam .band .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.exp-jam .stage-panel { position: relative; --u: 3px; border: 4px solid var(--gridhi); margin-top: 10px; background: var(--bg); touch-action: pan-y; box-shadow: 6px 6px 0 #000; }
.exp-jam canvas#stage { display: block; width: 100%; aspect-ratio: 240 / 190; image-rendering: pixelated; cursor: pointer; outline-offset: 3px; }
.exp-jam canvas#stage:focus-visible { outline: 3px solid var(--cyan); }
.exp-jam .center { position: absolute; left: 50%; top: calc(70 / 190 * 100%); transform: translate(-50%, -50%); --fs: max(11px, calc(var(--u) * 5.5)); pointer-events: none; }
.exp-jam .legend-in { position: absolute; left: calc(var(--u) * 5); top: calc(var(--u) * 134); font-size: max(11px, calc(var(--u) * 4.2)); font-weight: 700; color: var(--sub); pointer-events: none; text-shadow: 2px 2px 0 #000; }
.exp-jam .flash { position: absolute; left: 50%; top: calc(var(--u) * 140); transform: translate(-50%, -100%); --fs: max(11px, calc(var(--u) * 4.4)); opacity: 0; transition: opacity .2s; pointer-events: none; }
.exp-jam .flash.on { opacity: 1; }
.exp-jam .legend-m { display: none; }
.exp-jam .caption { min-height: 104px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px 14px; font-size: 25px; font-weight: 700; line-height: 1.36; word-break: keep-all; text-shadow: 3px 3px 0 #000; background: var(--band); margin-top: 10px; }
.exp-jam .caption .hid { visibility: hidden; }
.exp-jam .caption b.g { color: var(--gold); } .exp-jam .caption b.r { color: var(--red); }

.exp-jam .title-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--u) * 6); pointer-events: none; background: rgba(11,16,32,.55); }
.exp-jam .title-card.out { opacity: 0; transition: opacity .4s; }
.exp-jam .title-card[hidden] { display: none; }
.exp-jam .title-card .trow { display: flex; gap: calc(var(--u) * 4.5); }
.exp-jam .title-card .tg { font-weight: 700; font-size: calc(var(--u) * 32); width: calc(var(--u) * 45); height: calc(var(--u) * 47); display: grid; place-items: center; background: var(--chip); border: calc(var(--u) * 2) solid var(--text); text-shadow: calc(var(--u) * 2) calc(var(--u) * 2) 0 #000; animation: jm-pop .35s steps(5) both; }
.exp-jam .title-card .trow.b .tg { border-color: var(--red); }
.exp-jam .title-card .sub { --fs: max(11px, calc(var(--u) * 6)); color: var(--sub); }
@keyframes jm-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* 옆 칸 */
.exp-jam .side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.exp-jam .btns { display: flex; flex-wrap: wrap; gap: 10px; }
.exp-jam .btn.red { box-shadow: inset -3px -3px 0 #0006, inset 3px 3px 0 #ffffff14, 0 0 0 3px var(--red); }
.exp-jam .card { background: var(--band); border: 3px solid var(--gridhi); padding: 10px 12px; }
.exp-jam .card h2 { margin: 0 0 6px; font-size: 15px; color: var(--sub); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.exp-jam .card h2 .chip { --fs: 13px; }
.exp-jam .card h2 .h2s { font-size: 12px; font-weight: 400; }
.exp-jam .tracewrap canvas { display: block; width: 100%; max-width: 460px; aspect-ratio: 240 / 114; image-rendering: pixelated; }
.exp-jam .axes { display: flex; justify-content: space-between; font-size: 12px; color: var(--sub); margin-top: 3px; }
.exp-jam #read .r1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; --fs: 14px; }
.exp-jam #read dl { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin: 8px 0; font-size: 13px; }
.exp-jam #read dt { color: var(--sub); } .exp-jam #read dd { margin: 0; font-weight: 700; text-align: right; }
.exp-jam #read dd.warn { color: var(--red); }
.exp-jam #read .k { font-size: 12px; color: var(--sub); margin-bottom: 4px; }
.exp-jam #read .blocks { display: flex; flex-wrap: wrap; gap: 5px; --fs: 12px; }
.exp-jam #read .note { font-family: var(--read); font-size: 12px; color: var(--sub); }
.exp-jam #read .note.ok { color: var(--green); margin-top: 8px; }
.exp-jam .linknote { margin: 0; font: 12px/1.5 var(--read); color: var(--sub); }
.exp-jam .speedrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--sub); }
.exp-jam .speedrow button { font: 700 13px var(--pix); color: var(--text); background: var(--chip); border: 2px solid var(--gridhi); padding: 4px 8px; min-height: 36px; min-width: 40px; cursor: pointer; }
.exp-jam .speedrow button[aria-pressed=true], .exp-jam .presets button[aria-pressed=true] { background: var(--gold); color: var(--bg); border-color: #8a7020; }

.exp-jam #params { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.exp-jam .param { min-width: 0; }
.exp-jam .param .head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.exp-jam .param label { font-size: 14px; font-weight: 700; }
.exp-jam .param .val { display: flex; align-items: center; gap: 3px; }
.exp-jam .param input[type=number] { width: 68px; height: 34px; font: 700 15px var(--pix); text-align: right; color: var(--gold); background: var(--bg); border: 2px solid var(--gridhi); padding: 0 5px; }
.exp-jam .param .unit { font-size: 12px; color: var(--sub); min-width: 2.2em; }
.exp-jam .param input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; cursor: pointer; margin: 2px 0; }
.exp-jam .param input[type=range]::-webkit-slider-runnable-track { height: 8px; background: var(--bg); border: 2px solid var(--gridhi); }
.exp-jam .param input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 24px; margin-top: -10px; background: var(--cyan); border: 3px solid #1d6a8c; box-shadow: 2px 2px 0 #000; }
.exp-jam .param input[type=range]::-moz-range-track { height: 8px; background: var(--bg); border: 2px solid var(--gridhi); }
.exp-jam .param input[type=range]::-moz-range-thumb { width: 16px; height: 22px; background: var(--cyan); border: 3px solid #1d6a8c; border-radius: 0; }
.exp-jam .presets { display: flex; flex-wrap: wrap; gap: 4px; }
.exp-jam .presets button { font: 700 12px var(--pix); color: var(--text); background: var(--chip); border: 2px solid var(--gridhi); padding: 3px 6px; min-height: 32px; cursor: pointer; }
.exp-jam .presets button small { font-size: 11px; opacity: .85; }
.exp-jam .help { font-family: var(--read); font-size: 12px; color: var(--sub); margin-top: 4px; line-height: 1.4; }

@media (max-width: 1180px) { .exp-jam .lab { grid-template-columns: minmax(0, 1fr); } .exp-jam .stagecol, .exp-jam .side { max-width: 720px; } }
@media (max-width: 700px) {
  .exp-jam .band { --fs: 13px; min-height: 0; padding: 6px; }
  .exp-jam .caption { font-size: 18px; min-height: 84px; padding: 6px 10px; }
  .exp-jam #params { grid-template-columns: 1fr; }
  .exp-jam .stage-panel { border-width: 3px; }
  /* 휴대폰: 무대 위 글자가 11px 아래로 줄기 때문에, 도로 한가운데 칩과 막대 설명은 무대 밖(HUD·아래 글)으로 뺀다 */
  .exp-jam .center, .exp-jam .legend-in { display: none; }
  .exp-jam .legend-m { display: block; margin: 8px 0 0; font: 12px/1.5 var(--read); color: var(--sub); }
  .exp-jam .btns .btn { flex: 1 1 calc(50% - 10px); padding: 8px 6px; font-size: 14px; }
}
