/* Palimplace contributor tool — Apache-2.0. */
:root {
  --bg: #0b0f14; --panel: #0e151d; --line: #1d2733; --text: #c9d4e0; --muted: #7c8a9a;
  --evidence: #ffb454; --inference: #5ad1ff; --ok: #6ee7a8; --bad: #ff8088;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 13.5px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#map { position: absolute; inset: 0 380px 0 0; }

#panel { position: absolute; top: 0; right: 0; bottom: 0; width: 380px; overflow-y: auto;
  background: var(--panel); border-left: 1px solid var(--line); padding: 18px 18px 40px; }
#panel h1 { font-size: 17px; margin: 0 0 4px; }
#panel .lede { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
#panel .navhint { color: var(--muted); font-size: 11px; margin: 0 0 4px; padding: 7px 9px; background: #0b1118;
  border: 1px solid var(--line); border-radius: 6px; }
#panel .navhint b { color: var(--text); font-weight: 600; }
#panel section { border-top: 1px solid var(--line); padding: 12px 0; }
#panel h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.seam-note { text-transform: none; letter-spacing: 0; color: var(--inference); font-weight: 400; }
.mini { float: right; text-transform: none; letter-spacing: 0; font-size: 11px; font-weight: 500;
  background: #16202c; color: var(--muted); border: 1px solid var(--line); border-radius: 5px;
  padding: 2px 8px; cursor: pointer; }
.mini:hover { border-color: var(--muted); color: var(--text); }
.mini.look { float: none; display: block; width: 100%; margin: 8px 0 4px; padding: 6px; text-align: center; }
.mini.armed { background: var(--evidence); color: #17110a; border-color: var(--evidence); }
.place-pick { position: relative; margin: 2px 0 12px; }
.place-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer;
  font-family: ui-monospace, monospace; font-size: 12px; letter-spacing: .05em; color: var(--evidence); text-align: left; }
.place-btn .caret { color: var(--muted); font-size: 10px; }
.place-btn:hover { filter: brightness(1.14); }
.place-menu { display: none; position: absolute; left: 0; top: calc(100% + 4px); z-index: 40; min-width: 260px;
  background: #0b1118; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.6); overflow: hidden; }
.place-menu.open { display: block; }
.place-filter { display: block; width: 100%; box-sizing: border-box; background: #0b1118; border: 0; border-bottom: 1px solid var(--line);
  color: var(--text); padding: 8px 10px; font-size: 12px; outline: none; }
.place-filter::placeholder { color: var(--muted); }
.place-list { list-style: none; margin: 0; padding: 4px; max-height: 280px; overflow-y: auto; }
.place-list li { padding: 6px 9px; border-radius: 4px; font-size: 12px; line-height: 1.35; color: var(--text); cursor: pointer; }
.place-list li:hover { background: #16202c; }
.place-list li.sel { color: var(--evidence); }
.orurl { display: flex; gap: 6px; margin: 8px 0 2px; }
.orurl input { flex: 1; background: #0b1118; border: 1px solid var(--line); border-radius: 5px; color: var(--text); padding: 5px 8px; font-size: 12px; }
.orurl .mini { float: none; }
.home-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; margin-bottom: 10px; font-size: 18px; letter-spacing: -.01em; }
.home-link .a { color: var(--evidence); } .home-link .b { color: var(--text); }
.home-link:hover { opacity: .85; }
.hint { color: var(--muted); font-size: 12px; margin: 0 0 6px; }
.coord { font-variant-numeric: tabular-nums; color: var(--evidence); font-size: 12px; margin-bottom: 10px; }

label.row { display: grid; grid-template-columns: 86px 1fr 48px; align-items: center; gap: 10px;
  font-size: 12px; color: var(--muted); margin: 8px 0; }
label.row input[type=range] { width: 100%; accent-color: var(--evidence); }
label.row .val { text-align: right; font-variant-numeric: tabular-nums; }
label.row .val b { color: var(--text); }
.field { display: block; font-size: 11.5px; color: var(--muted); margin: 8px 0; }
.field input, .field select { display: block; width: 100%; margin-top: 3px; background: #0b1118;
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; color: var(--text); font-size: 13px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--inference); }
input[type=file] { width: 100%; font-size: 12px; color: var(--muted); margin-bottom: 8px; }

/* custom dropdown — native <select> popups ignore page font size, so we roll our own */
.dropdown { position: relative; margin-top: 3px; }
.dd-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: #0b1118; border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px;
  color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.dd-btn:hover { border-color: var(--muted); }
.dd-btn .caret { color: var(--muted); font-size: 11px; }
.dd-list { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; margin: 0; padding: 4px;
  list-style: none; background: #0b1118; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0,0,0,.55); max-height: 280px; overflow-y: auto; }
.dd-list.open { display: block; }
.dd-list li { padding: 6px 9px; border-radius: 4px; font-size: 12.5px; color: var(--text); cursor: pointer; white-space: nowrap; }
.dd-list li:hover { background: #16202c; }
.dd-list li.sel { color: var(--evidence); }

#emit { width: 100%; background: var(--evidence); color: #1a1205; border: 0; border-radius: 7px;
  padding: 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
#emit:hover { filter: brightness(1.08); }
#verdict { font-size: 12px; margin: 10px 0; min-height: 16px; }
#verdict.ok { color: var(--ok); }
#verdict.bad { color: var(--bad); }
#out { background: #070b0f; border: 1px solid var(--line); border-radius: 6px; padding: 10px; font-size: 10.5px;
  line-height: 1.4; max-height: 240px; overflow: auto; white-space: pre; color: #aebfd0; }
#out:empty { display: none; }
#actions { display: flex; gap: 8px; margin-top: 8px; }
#actions button { flex: 1; background: #16202c; color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 7px; cursor: pointer; font-size: 12px; }
#actions button:hover { border-color: var(--muted); }
.pr { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.pr code { background: #16202c; padding: 1px 5px; border-radius: 4px; color: var(--text); }
