/* Player editor: character slots, the route line, money, stats, skin tones, raw JSON, and the item picker. */

/* ----- character slots ----- */
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.slot { position: relative; display: flex; align-items: center; gap: 11px; min-width: 0; padding: 10px 12px; text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--lift); transition: border-color .15s, background .15s; }
.slot:hover { border-color: var(--line-3); }
.slot:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.slot.on { border-color: var(--accent); background: linear-gradient(180deg, rgba(232, 112, 26, .1), rgba(232, 112, 26, .02)), var(--panel); box-shadow: inset 0 0 0 1px rgba(232, 112, 26, .35); }
.slot:active { transform: scale(.99); }
.slot-n { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 7px; background: var(--raise); border: 1px solid var(--line-2); font: 600 14px var(--display); color: var(--sub); transition: background .15s, color .15s, border-color .15s; }
.slot.on .slot-n { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.slot-main { display: grid; min-width: 0; line-height: 1.4; gap: 1px; }
.slot-main b { font-weight: 600; }
.slot-sub { font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.slot-sub .badge { height: 18px; padding: 0 7px; font-size: 11px; }
.route { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; margin: 0 0 16px; min-height: 22px; }
@media (max-width: 760px) { .slots { grid-template-columns: 1fr; gap: 6px; } .slot { padding: 8px 10px; } }

/* ----- money / stats ----- */
.money-now { font: 500 32px/1.15 var(--display); letter-spacing: .005em; color: var(--green); font-variant-numeric: tabular-nums; }
.stat-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat-form .hint { font-size: 11.5px; min-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ----- character ----- */
.tones { display: flex; flex-wrap: wrap; gap: 6px; }
.tone { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px 0 6px; border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer; font-size: 12.5px; color: var(--sub); transition: border-color .15s, color .15s; }
.tone input { position: absolute; opacity: 0; pointer-events: none; }
.tone i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.tone:hover { border-color: var(--line-3); color: var(--text); }
.tone:has(input:checked) { border-color: var(--accent); color: var(--text); background: var(--accent-dim); }
.tone:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
.swatch-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }

/* ----- inventory ----- */
.chip-x { margin-left: 2px; padding: 0 2px; border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 14px; line-height: 1; }
.chip-x:hover { color: var(--red); }
table.items td:nth-child(3) { white-space: nowrap; }

/* ----- raw JSON ----- */
.rawjson { display: block; width: calc(100% - 32px); margin: 14px 16px; min-height: 520px; height: 62vh; padding: 14px 16px; font: 12px/1.65 var(--mono); color: #D8D0C4; white-space: pre; tab-size: 2; border-radius: 8px; }
.problems { margin: 6px 0 0; padding-left: 18px; color: var(--sub); font-size: 12.5px; max-height: 260px; overflow: auto; }
.problems li { margin: 3px 0; }
.problems .mono { color: var(--text); }

/* ----- item picker ----- */
.dialog.picker { width: min(900px, 100%); height: min(640px, calc(100vh - 32px)); display: flex; flex-direction: column; }
.pk-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.pk-head h2 { white-space: nowrap; }
.pk-head .input { flex: 1; }
.pk-tabs { margin: 0; padding: 0 10px; }
.pk-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.pk-list-wrap { min-height: 0; overflow-y: auto; border-right: 1px solid var(--line); }
.pk-mine { padding: 8px 14px 0; }
.pk-list { list-style: none; margin: 0; padding: 6px; }
.pk-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n p" "s p"; column-gap: 12px; padding: 6px 10px; border-radius: var(--radius); cursor: pointer; transition: background .1s; }
.pk-list li:hover { background: rgba(255, 236, 214, 0.035); }
.pk-list li.on { background: var(--accent-dim); box-shadow: inset 2px 0 0 var(--accent); }
.pk-list .n { grid-area: n; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-list .s { grid-area: s; font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-list .p { grid-area: p; align-self: center; font: 500 12px var(--mono); color: var(--sub); font-variant-numeric: tabular-nums; }
.pk-list .pk-empty { display: block; color: var(--faint); cursor: default; }
.pk-side { padding: 16px; overflow-y: auto; display: grid; gap: 12px; align-content: start; }
.pk-side p { margin: 0; }
.pk-title { font: 600 18px/1.3 var(--display); }
.pk-state { display: grid; gap: 12px; }
.pk-state[hidden], .pk-hot[hidden], .pk-mine[hidden] { display: none; }
.pk-none { padding-top: 40px; text-align: center; }
.picker .dfoot { border-top: 1px solid var(--line); padding-top: 12px; padding-bottom: 12px; }
@media (max-width: 760px) {
  .dialog.picker { height: calc(100vh - 32px); }
  .pk-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .pk-list-wrap { border-right: 0; border-bottom: 1px solid var(--line); }
  .pk-side { max-height: 42vh; }
}
