.limen {
  --bg: #02080c;
  --panel: #050d13;
  --row: #07131b;
  --line: #173344;
  --line-strong: #24536b;
  --text: #c9d7e5;
  --muted: #8ea4b7;
  --dim: #627b8e;
  --cyan: #00c8ff;
  --red: #ff403b;
  --green: #00d69a;
  --amber: #ffc64b;
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 174px;
  transition: grid-template-rows 0.45s ease;
  gap: 11px;
  padding: 10px 12px 12px;
  background: var(--bg);
  color: var(--text);
  font-family: Rajdhani, Inter, "Segoe UI", sans-serif;
}

.limen[hidden] { display: none; }
.limen-top,
.limen-body,
.limen-time,
.limen-left,
.limen-right,
.limen-stage { min-width: 0; min-height: 0; }

.limen-top,
.limen-left,
.limen-right,
.limen-stage,
.limen-time {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.limen-top {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: min-content;
  height: auto;
  padding: 10px 16px;
}

.limen-center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  min-width: 0;
}

.limen-brand { display: flex; align-items: center; gap: 12px; flex: none; }
.limen-brand img { width: 62px; height: 62px; flex: none; filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.45)); }
.limen-brand strong {
  display: block;
  font-family: Orbitron, sans-serif;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: 0.16em;
  line-height: 1;
}
.limen-brand span { display: block; margin-top: 3px; font-size: 15px; letter-spacing: 0.14em; color: var(--muted); }
.limen-brand small {
  display: block;
  margin-top: 3px;
  max-width: 260px;
  overflow: hidden;
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--dim);
}

.limen-tabs { display: flex; gap: 8px; flex: none; }
.limen-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 62px;
  min-width: 150px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #071018;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.limen-tabs button svg { width: 22px; height: 22px; flex: none; }
.limen-tabs button.is-on {
  color: var(--text);
  border-color: var(--cyan);
  background: #082033;
  box-shadow: inset 0 -3px 0 var(--cyan), 0 0 12px rgba(0, 200, 255, 0.25);
}

.limen-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 28rem;
  min-width: 0;
}
.limen-quick .limen-views,
.limen-bases {
  position: static;
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(5, 13, 19, 0.88);
}
.limen-quick button {
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 0;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.limen-quick button:hover { filter: none; color: var(--text); }
.limen-quick button svg { width: 16px; height: 16px; display: block; }
.limen-quick button.is-on {
  color: var(--cyan);
  background: #082033;
  box-shadow: inset 0 -2px 0 var(--cyan);
}
.limen-fold-bar { display: none; }
.limen-find { position: relative; flex: 1 1 22rem; min-width: 16rem; max-width: 34rem; margin: 0; }
.limen-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #071018;
  color: var(--dim);
}
.limen-hits {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  background: #071018;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}
.limen-hits[hidden] { display: none; }
.limen-hits button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.limen-hits button:hover { background: #082033; }
.limen-hits small { color: var(--dim); font-size: 11px; letter-spacing: 0.04em; }
.limen-hits button[disabled] { cursor: default; }
.limen-grade { margin: 0 0 8px; font-size: 13px; line-height: 18px; }
.limen-search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(0, 200, 255, 0.25); }
.limen-search svg { width: 16px; height: 16px; flex: none; }
.limen-search input {
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: 0;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
}
.limen-search kbd {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 5px;
  color: var(--dim);
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 11px;
}

.limen-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: none;
  gap: 3px;
  min-width: 220px;
  text-align: left;
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 16px;
  line-height: 1.35;
  color: var(--muted);
}
.limen-meta #limen-coords { color: var(--cyan); letter-spacing: 0.02em; }

.limen-body {
  display: grid;
  grid-template-columns: 342px minmax(0, 1fr) 458px;
  gap: 11px;
}

.limen-left, .limen-right { overflow: auto; padding: 10px 12px 12px; }
.limen-left { overflow: auto; }
.limen-scroll { min-height: 0; }
.limen-head { display: flex; align-items: center; justify-content: space-between; }
.limen-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.limen-panel-head h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.limen-panel-head button {
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #071018;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.limen h2, .limen-kicker {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.limen h2.split { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.limen-paradigm, .limen-layer, .limen-tabs button, .limen-card, .limen-book button, .limen-links button, .limen-session, .limen-place-head button, .limen-zoom button, #limen-time-expand, [data-more] {
  font: inherit;
  color: inherit;
}

.limen-paradigm, .limen-layer {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border-radius: 4px;
  cursor: pointer;
  background: var(--row);
}

.limen-paradigm {
  min-height: 78px;
  margin: 0 0 7px;
  padding: 8px 10px;
  border: 1px solid var(--p, var(--cyan));
  background: linear-gradient(90deg, color-mix(in srgb, var(--p) 18%, #050d13), #071018 72%);
  box-shadow: inset 3px 0 0 var(--p, var(--cyan));
}
.limen-paradigm.is-on { box-shadow: inset 3px 0 0 var(--p), 0 0 12px color-mix(in srgb, var(--p) 40%, transparent); }
.limen-paradigm em, .limen-layer em {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--p, var(--cyan));
}
.limen-paradigm em { width: 58px; height: 50px; }
.limen-paradigm svg { width: 40px; height: 40px; }
.limen-paradigm strong { display: block; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; }
.limen-paradigm small { display: block; color: var(--muted); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; line-height: 15px; }
.limen-paradigm[data-paradigm="kontrola"] { --p: var(--cyan); }
.limen-paradigm[data-paradigm="konfrontacja"] { --p: var(--red); }
.limen-paradigm[data-paradigm="eksploracja"] { --p: var(--green); }

.limen-layer {
  height: 40px;
  margin: 0 0 5px;
  padding: 0 8px;
  border: 1px solid var(--line);
}
.limen-layer em { width: 22px; height: 22px; }
.limen-layer svg { width: 18px; height: 18px; }
.limen-layer span { flex: 1; font-size: 13px; }
.limen-count {
  min-width: 1.6rem;
  color: var(--dim);
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  text-align: right;
}
.limen-group-note,
.limen-age-note {
  margin: 0 0 8px;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.35;
}
.limen-age,
.limen-layer-actions {
  display: flex;
  gap: 6px;
  margin: 0 0 8px;
}
.limen-age button,
.limen-layer-actions button {
  flex: 1;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #071018;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.limen-age button.is-on,
.limen-layer-actions button.is-on {
  color: var(--text);
  border-color: var(--cyan);
  background: #082033;
}
.limen-layer i {
  width: 22px;
  height: 22px;
  border: 1px solid var(--dim);
  border-radius: 2px;
  background: #041018;
  flex: none;
}
.limen-layer.is-on i {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 200, 255, 0.55);
}
.limen-layer.is-on i::after {
  content: "";
  display: block;
  width: 10px;
  height: 5px;
  margin: 6px 0 0 5px;
  border-left: 2px solid #041018;
  border-bottom: 2px solid #041018;
  transform: rotate(-45deg);
}
.limen-layer[data-layer="incydenty"],
.limen-layer[data-layer="misje"] { box-shadow: inset 2px 0 0 var(--red); }

.limen-stage { position: relative; overflow: hidden; background:
  radial-gradient(circle at 50% 48%, rgba(0, 90, 130, 0.16), transparent 58%),
  linear-gradient(rgba(23, 51, 68, 0.35) 1px, transparent 1px),
  linear-gradient(90deg, rgba(23, 51, 68, 0.35) 1px, transparent 1px),
  #030910;
  background-size: auto, 32px 32px, 32px 32px, auto;
}
#limen-map { position: absolute; inset: 0; }
#limen-mapnote {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  max-width: 280px;
  color: var(--amber);
  font-size: 12px;
}
#limen-map .maplibregl-ctrl-attrib {
  font-size: 10px;
  background: rgba(2, 8, 12, 0.78);
}
#limen-map .maplibregl-ctrl-attrib a { color: var(--muted); }

.limen-maptools { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; gap: 8px; align-items: flex-start; }
.limen-maptools > button,
.limen-spin button {
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(5, 13, 19, 0.88);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.limen-maptools > button { padding: 0 8px; }
.limen-maptools > button.is-on { color: var(--text); box-shadow: inset 0 -2px 0 var(--cyan); }
.limen-spin { display: none; flex-direction: column; gap: 6px; }
.limen-stage.is-disk .limen-spin { display: flex; }
.limen-spin button { width: 32px; padding: 0; font-size: 16px; letter-spacing: 0; text-transform: none; }
.limen.is-nosides .limen-left,
.limen.is-nosides .limen-right { display: none; }
.limen.is-nosides .limen-body { grid-template-columns: minmax(0, 1fr); }
.limen.is-notime { grid-template-rows: auto minmax(0, 1fr); }
.limen.is-notime .limen-time { display: none; }
.limen.is-timefull {
  grid-template-rows: minmax(0, 1fr);
  align-content: start;
  gap: 0;
  padding: 8px 12px 12px;
}
.limen.is-timefull .limen-top,
.limen.is-timefull .limen-body { display: none; }
.limen-attrib {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 8px;
  margin: 0;
  max-width: 72%;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.03em;
  pointer-events: none;
}
.limen-stage.is-disk .limen-attrib { bottom: 46px; }
.limen-views { display: flex; }
#limen-disk {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: none;
  cursor: grab;
  touch-action: none;
}
.limen-stage.is-disk #limen-disk { display: block; }
.limen-stage.is-disk #limen-map { visibility: hidden; }
.limen-diskcap {
  display: none;
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 92px;
  bottom: 28px;
  margin: 0;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.limen-stage.is-disk .limen-diskcap { display: block; }
.limen-compass {
  width: 60px;
  height: 60px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  position: relative;
  background: rgba(5, 13, 19, 0.72);
}
.limen-compass::before, .limen-compass::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--dim);
}
.limen-compass::after { transform: rotate(90deg); }
.limen-compass b { position: absolute; top: 2px; left: 0; right: 0; text-align: center; font-size: 10px; letter-spacing: 0.08em; z-index: 1; }
.limen-zoom { display: flex; flex-direction: column; gap: 6px; }
.limen-zoom button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(5, 13, 19, 0.88);
  color: var(--text);
  cursor: pointer;
}
.limen-zoom svg { width: 16px; height: 16px; }

.limen-pins, .limen-tags { position: absolute; inset: 0; pointer-events: none; }
.limen-pin {
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.75), 0 0 6px currentColor;
}
.limen-pin.is-on { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; box-shadow: 0 0 0 2px #fff, 0 0 8px var(--cyan); }
.limen-pin[data-paradigm="kontrola"] { background: var(--cyan); color: var(--cyan); }
.limen-pin[data-paradigm="konfrontacja"] { background: var(--red); color: var(--red); }
.limen-pin[data-paradigm="eksploracja"] { background: var(--green); color: var(--green); }

.limen-tag {
  position: absolute;
  transform: translate(-50%, -100%);
  text-align: center;
  color: #f4fbff;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.limen-tag.is-city {
  padding: 2px 7px;
  background: rgba(5, 13, 19, 0.9);
  border: 1px solid #d5e7f5;
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0.14em;
  font-weight: 700;
}
.limen-tag.is-zone {
  padding: 2px 4px;
  background: rgba(2, 8, 12, 0.55);
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 600;
  line-height: 13px;
}

.limen-place-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; min-height: 84px; }
.limen-right h3 { margin: 0; font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase; }
.limen-right .where, .limen-right .coords { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.limen-right .coords { font-family: "Share Tech Mono", ui-monospace, monospace; font-size: 11px; color: var(--dim); }
.limen-place-head button {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.limen-side-tabs { display: flex; flex-wrap: wrap; gap: 4px; height: auto; margin: 8px 0; }
.limen-side-tabs button {
  flex: 1 1 30%;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  background: #071018;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.limen-side-tabs button.is-on {
  color: var(--text);
  background: #082033;
  border-color: var(--cyan);
  box-shadow: inset 0 -2px 0 var(--cyan);
}
.limen-shots { display: grid; grid-template-columns: 1fr 123px; gap: 8px; height: 120px; }
.limen-shots img { width: 100%; height: 120px; object-fit: cover; border: 1px solid var(--line); border-radius: 3px; background: #071018; }
.limen-kicker { margin: 10px 0 6px; }
.limen-status a { color: #7ee0ff; }
.limen-status { list-style: none; margin: 0; padding: 0; }
.limen-status li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(23, 51, 68, 0.9);
  font-size: 13px;
}
.limen-status span { color: var(--muted); }
.limen-status .warn { color: var(--red); font-weight: 600; }
.limen-status .meter { display: flex; align-items: center; gap: 3px; font-weight: 500; }
.limen-status .meter i { width: 8px; height: 8px; background: #143028; border-radius: 1px; }
.limen-status .meter[data-n="2"] i:nth-child(-n+2),
.limen-status .meter[data-n="3"] i:nth-child(-n+3),
.limen-status .meter[data-n="4"] i { background: var(--green); }
.orgs { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; font-size: 12px; color: var(--muted); }
.orgs span { display: flex; gap: 6px; }
.orgs i { width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 50%; }
.orgs .c { color: var(--cyan); }
.orgs .r { color: var(--red); }
.orgs .g { color: var(--green); }
.orgs .n { color: var(--dim); }
.limen-lead { margin: 0; font-size: 13px; line-height: 18px; color: var(--text); }
[data-more] { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--cyan); cursor: pointer; font-size: 12px; }
.limen-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.limen-links button {
  border: 1px solid var(--line);
  background: var(--row);
  border-radius: 3px;
  padding: 0;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.limen-links .thumb, .limen-card .thumb {
  display: block;
  height: 72px;
  background-size: cover;
  background-position: center;
}
.limen-links b, .limen-links small { display: block; padding: 2px 4px 0; font-size: 11px; }
.limen-links small { color: var(--dim); padding-bottom: 4px; }
.limen-session { margin-top: 8px; border: 1px solid var(--cyan); background: transparent; color: var(--text); border-radius: 3px; padding: 6px 10px; cursor: pointer; }
.limen-slots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; margin-bottom: 4px; }
.limen-slots.limen-slots-area { grid-template-columns: repeat(3, 1fr); }
.limen-slots button {
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #071018;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.limen-slots button.is-on { color: var(--text); border-color: var(--cyan); }
.limen-slots button.has-pin { box-shadow: inset 0 -2px 0 var(--green); }
.limen-signal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 3px;
  align-items: center;
  margin: 0 0 4px;
}
.limen-signal input[data-field="note"],
.limen-signal .limen-pair,
.limen-signal .limen-form-row { grid-column: 1 / -1; }
.limen-signal label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.limen-signal input,
.limen-signal select,
.limen-signal button {
  height: 24px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #071018;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  padding: 0 3px;
  text-transform: none;
  letter-spacing: 0;
}
.limen-signal.is-on input[data-field="name"] { border-color: var(--cyan); }
.limen-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.limen-dragpin {
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  background: rgba(5, 13, 19, 0.95);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  line-height: 26px;
  text-align: center;
  cursor: grab;
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.35);
}
.limen-dragpin.is-on {
  border-color: var(--green);
  box-shadow: 0 0 12px rgba(0, 214, 154, 0.45);
}
#limen-event-form label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 2px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
#limen-event-form input,
#limen-event-form select,
#limen-event-form textarea {
  text-transform: none;
  letter-spacing: 0;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: #071018;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 2px 6px;
}
#limen-event-form textarea { height: 36px; resize: vertical; }
.limen-form-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.limen-form-row button {
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #071018;
  color: var(--text);
  cursor: pointer;
}
.limen-feed { display: flex; flex-direction: column; gap: 4px; }
.limen-feed button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--row);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.limen-feed small { color: var(--dim); font-size: 11px; }
#limen-mark-status { min-height: 14px; color: var(--cyan); }

.limen-time {
  padding: 8px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}
.limen-time-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}
.limen-time-jumps { display: none; }
.limen.is-timefull .limen-time { grid-template-columns: 156px minmax(0, 1fr); }
.limen.is-timefull .limen-time-side {
  max-height: calc(100vh - 36px);
  min-height: 0;
  overflow: hidden;
}
.limen.is-timefull .limen-time-jumps {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}
.limen-time-jumps p {
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.limen-time-jumps p:first-child { margin-top: 0; }
.limen-time-jumps button {
  width: 100%;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #071018;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
}
.limen-time-jumps button.is-on {
  color: var(--text);
  border-color: var(--cyan);
  background: #082033;
  box-shadow: inset 2px 0 0 var(--cyan);
}
.limen-time-expand {
  width: 100%;
  height: 132px;
  align-self: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #071018;
  color: var(--cyan);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.limen-time-expand svg { width: 52px; height: 52px; display: block; }
.limen-time-expand.is-on { background: var(--cyan); color: #041018; }
.limen.is-timefull .limen-time-expand { height: 42px; align-self: stretch; }
.limen.is-timefull .limen-time-expand svg { width: 22px; height: 22px; }
.limen-time-main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.limen.is-timefull .limen-time { height: auto; max-height: 100%; align-items: start; }
.limen.is-timefull .limen-time-main { height: auto; max-height: 100%; display: flex; flex-direction: column; }
.limen.is-timefull .limen-axis-wrap { flex: 0 1 auto; }
.limen-timehead { display: flex; align-items: baseline; gap: 12px; height: 28px; }
.limen-timehead h2 { font-size: 16px; color: var(--text); }
#limen-when {
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--cyan);
}
.limen-scale {
  position: relative;
  height: 22px;
  margin: 0;
  color: var(--dim);
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 10px;
  user-select: none;
}
.limen.is-timefull .limen-scale { height: 28px; }
.limen-scale span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.limen-scale .limen-scale-tag,
.limen-ruler .limen-scale-tag {
  position: absolute;
  z-index: 6;
  right: 8px;
  left: auto;
  top: 4px;
  transform: none;
  padding: 1px 7px 0;
  border: 1px solid var(--cyan);
  border-radius: 3px;
  background: rgba(5, 13, 19, 0.92);
  color: var(--cyan);
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}
.limen-scale .limen-scale-tag { top: 0; }
.limen-scale span.is-minor {
  top: 14px;
  width: 1px;
  height: 8px;
  background: var(--line-strong);
}
.limen-scale .is-now { color: var(--cyan); }
.limen-time input[type="range"] { width: 100%; height: 22px; margin: 0; accent-color: var(--cyan); cursor: grab; }
.limen-time input[type="range"]:active { cursor: grabbing; }
.limen-cards {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  cursor: grab;
  touch-action: pan-y;
  padding-bottom: 4px;
  scroll-behavior: smooth;
}
.limen-cards:active { cursor: grabbing; }
.limen-card {
  flex: 0 0 230px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #071018;
  text-align: left;
  cursor: pointer;
  opacity: 0.55;
}
.limen-card.is-on { opacity: 1; border-color: var(--line-strong); }
.limen-card.is-pick { border-color: var(--cyan); }
.limen-card i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.limen-card i.is-arch { background: #d7ebf6; }
.limen-card i[data-paradigm="kontrola"] { background: var(--cyan); }
.limen-card i[data-paradigm="konfrontacja"] { background: var(--red); }
.limen-card i[data-paradigm="eksploracja"] { background: var(--green); }
.limen-card .copy { flex: 1; min-width: 0; }
.limen-card small, .limen-card b, .limen-card strong { display: block; }
.limen-card small { color: var(--dim); font-size: 10px; }
.limen-card b { font-size: 11px; letter-spacing: 0.06em; }
.limen-card strong { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.limen-card em { display: none; font-style: normal; color: var(--dim); font-size: 11px; }
.limen-card .thumb { width: 78px; height: 54px; flex: none; border-radius: 2px; }
.limen.is-timefull .limen-scale,
.limen.is-timefull .limen-cards { display: none; }
.limen.is-timefull .limen-time input[type="range"] {
  display: block;
  height: 28px;
  margin: 4px 0 6px;
}
.limen-axis-wrap { display: none; }
.limen.is-timefull .limen-axis-wrap {
  display: block;
  min-width: 0;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 64px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
  outline: none;
}
.limen-axis {
  height: auto;
  display: grid;
  grid-template-rows: 76px 104px 70px 104px 76px;
  align-content: start;
  position: relative;
}
.limen-band { position: relative; min-width: 0; overflow: visible; }
.limen-ruler {
  position: relative;
  display: block;
  height: 78px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: #071018;
  cursor: grab;
  touch-action: none;
}
.limen-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  pointer-events: none;
}
.limen-tick b {
  position: absolute;
  left: 3px;
  bottom: 2px;
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  color: var(--dim);
  white-space: nowrap;
}
.limen-tick.is-minor { opacity: 0.75; }
.limen-tick.is-minor b { top: 2px; bottom: auto; font-size: 8px; }
.limen-fork {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.limen-fork-line { stroke: #8b98a6; stroke-width: 2; }
.limen-xdot { fill: #ff403b; }
.limen-ghost { fill: #9aa6b2; opacity: 0.55; filter: blur(2.4px); }
.limen-fork-lane {
  height: 36px;
  background: rgba(130, 142, 156, 0.1);
}
.limen-fork-lane.is-up { box-shadow: inset 0 -1px 0 rgba(150, 162, 174, 0.4); }
.limen-fork-lane.is-down { box-shadow: inset 0 1px 0 rgba(150, 162, 174, 0.4); }
.limen.is-timefull .limen-time,
.limen.is-timefull .limen-axis,
.limen.is-timefull .limen-pin {
  user-select: none;
  -webkit-user-select: none;
}
.limen-axis { cursor: grab; }
.limen-axis.is-panning,
.limen-axis.is-panning .limen-ruler,
.limen-axis.is-panning .limen-epochs { cursor: grabbing; }
.limen-epochs {
  position: relative;
  height: 26px;
  border-bottom: 1px solid var(--line);
  background: #050b12;
  cursor: grab;
  touch-action: none;
}
.limen-epochs:active { cursor: grabbing; }
.limen-epoch {
  position: absolute;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
  padding: 6px 4px 0;
  border-left: 1px solid var(--line-strong);
  color: var(--dim);
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  overflow: hidden;
  white-space: nowrap;
}
.limen-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  margin-left: -7px;
  pointer-events: none;
  z-index: 4;
}
.limen-now::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ff403b;
}
.limen-now.is-edge-left,
.limen-now.is-edge-right { width: 14px; margin-left: 0; }
.limen-now.is-edge-left::before,
.limen-now.is-edge-right::before {
  width: 0;
  height: 0;
  top: 10px;
  bottom: auto;
  background: transparent;
}
.limen-now.is-edge-left::before {
  left: 2px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 9px solid #ff403b;
}
.limen-now.is-edge-right::before {
  left: auto;
  right: 2px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #ff403b;
}
.limen-nowtick {
  position: absolute;
  top: 0;
  width: 2px;
  height: 22px;
  margin-left: -1px;
  background: #ff403b;
  pointer-events: none;
}
.limen-time-tools { display: none; }
.limen.is-timefull .limen-time-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.limen-time-pad { display: none; }
.limen.is-timefull .limen-time-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: absolute;
  z-index: 7;
  right: 8px;
  top: 42px;
}
.limen-time-pad > div { display: flex; gap: 6px; }
.limen-time-pad button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(5, 13, 19, 0.9);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.limen-time-tools button,
.limen-own-form button {
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #071018;
  color: var(--text);
  cursor: pointer;
}
.limen-time-tools span {
  min-width: 11rem;
  color: var(--cyan);
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 11px;
}
.limen.is-timefull .limen-timehead { height: auto; flex-wrap: wrap; }
.limen-own-form {
  display: none;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.limen-own-form.is-on { display: flex; }
.limen-own-form input {
  height: 24px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #071018;
  color: var(--text);
}
.limen-axis .limen-pin.is-wlasna { border-color: #e7d7a1; }
.limen-axis .limen-pin.is-wlasna .stem { background: #e7d7a1; }
.limen-card.is-wlasna { border-color: #e7d7a1; }
.limen-axis .limen-pin.is-x { border-color: #ff403b; border-width: 2px; }
.limen-axis .limen-pin.is-x .stem { background: #ff403b; }
.limen-year {
  position: relative;
  flex: 0 0 var(--year, 360px);
  width: var(--year, 360px);
  height: 100%;
  border-left: 1px solid var(--line);
  color: var(--dim);
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 11px;
}
.limen-year b {
  position: absolute;
  left: 2px;
  bottom: 1px;
  font-weight: 500;
}
.limen-year i {
  position: absolute;
  top: 0;
  width: 1px;
  height: 9px;
  background: var(--line-strong);
}
.limen-year i b {
  position: absolute;
  top: 8px;
  left: 2px;
  font-size: 8px;
  font-weight: 500;
  color: var(--dim);
}
.limen-year.is-now { color: var(--cyan); }
.limen-zone {
  position: absolute;
  bottom: calc(16px + var(--lane, 0) * 4px);
  height: 3px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: #00d69a;
  color: #00d69a;
  font-weight: 500;
  line-height: 0;
  cursor: pointer;
  z-index: 3;
}
.limen-zone b {
  position: absolute;
  left: 0;
  bottom: calc(4px + var(--lane, 0) * 11px);
  max-width: 160px;
  overflow: hidden;
  font-size: 9px;
  font-weight: 500;
  line-height: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.limen-knob {
  position: absolute;
  top: 0;
  height: 100%;
  width: 18px;
  margin-left: -9px;
  background: transparent;
  pointer-events: none;
  z-index: 3;
}
.limen-knob::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--cyan);
}
.limen-axis .limen-pin {
  position: absolute;
  box-sizing: border-box;
  width: 168px;
  height: 62px;
  min-height: 0;
  margin: 0;
  padding: 4px 6px 4px 8px;
  border: 1px solid #3aa0ff;
  border-radius: 3px;
  background: #071018;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  opacity: 0.45;
  overflow: hidden;
  z-index: 1;
}
.limen-axis .limen-pin.is-on {
  width: 168px;
  height: 62px;
  min-height: 0;
  margin: 0;
  opacity: 1;
  border-radius: 3px;
  box-shadow: none;
}
.limen-axis .limen-pin:hover,
.limen-axis .limen-pin:focus-visible {
  width: 240px;
  height: auto;
  min-height: 74px;
  overflow: visible;
  opacity: 1;
  z-index: 8;
}
.limen-band.is-sesja-top .limen-pin:hover,
.limen-band.is-sesja-top .limen-pin:focus-visible,
.limen-band.is-upper .limen-pin:hover,
.limen-band.is-upper .limen-pin:focus-visible { transform: scale(1.04); transform-origin: left bottom; }
.limen-band.is-sesja-bot .limen-pin:hover,
.limen-band.is-sesja-bot .limen-pin:focus-visible,
.limen-band.is-lower .limen-pin:hover,
.limen-band.is-lower .limen-pin:focus-visible { transform: scale(1.04); transform-origin: left top; }
.limen-axis .limen-pin:hover small,
.limen-axis .limen-pin:hover strong,
.limen-axis .limen-pin:hover b,
.limen-axis .limen-pin:hover em,
.limen-axis .limen-pin:focus-visible small,
.limen-axis .limen-pin:focus-visible strong,
.limen-axis .limen-pin:focus-visible b,
.limen-axis .limen-pin:focus-visible em { white-space: normal; }
.limen-axis .limen-pin.is-pick { box-shadow: 0 0 0 1px var(--cyan); }
.limen-axis .limen-pin .stem {
  position: absolute;
  left: 14px;
  width: 1px;
  background: #3aa0ff;
  pointer-events: none;
}
.limen-axis .limen-pin small,
.limen-axis .limen-pin strong,
.limen-axis .limen-pin b,
.limen-axis .limen-pin em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.limen-axis .limen-pin small,
.limen-axis .limen-pin em { color: var(--dim); font-size: 10px; font-style: normal; }
.limen-axis .limen-pin strong { font-size: 12px; color: var(--text); }
.limen-axis .limen-pin b { font-size: 10px; letter-spacing: 0.04em; }
.limen-band.is-sesja-top .limen-pin,
.limen-band.is-upper .limen-pin { bottom: calc(var(--stack, 0px) + 8px); }
.limen-band.is-sesja-bot .limen-pin,
.limen-band.is-lower .limen-pin { top: calc(var(--stack, 0px) + 8px); }
.limen-band.is-sesja-top .limen-pin .stem,
.limen-band.is-upper .limen-pin .stem { top: 100%; height: calc(var(--stack, 0px) + 8px); }
.limen-band.is-sesja-bot .limen-pin .stem,
.limen-band.is-lower .limen-pin .stem { bottom: 100%; height: calc(var(--stack, 0px) + 8px); }
.limen-axis .limen-pin.is-rekord { border-color: #3aa0ff; }
.limen-axis .limen-pin.is-rekord .stem { background: #3aa0ff; }
.limen-axis .limen-pin.is-sesja { border-color: #ffc64b; background: #241c08; }
.limen-axis .limen-pin.is-sesja .stem { background: #ffc64b; }
.limen-axis .limen-pin.is-event { border-color: #ff403b; border-width: 2px; }
.limen-axis .limen-pin.is-event .stem { background: #ff403b; }
.limen-axis .limen-pin.is-strefa { border-color: #00d69a; background: #062218; }
.limen-axis .limen-pin.is-strefa .stem { background: #00d69a; }
.limen-card.is-rekord { border-color: #3aa0ff; }
.limen-card.is-sesja { border-color: #ffc64b; background: #241c08; }
.limen-card.is-event { border-color: #ff403b; border-width: 2px; }
.limen-card.is-strefa { border-color: #00d69a; background: #062218; }
.limen-book {
  position: fixed;
  z-index: 35;
  top: 12px;
  right: 78px;
  bottom: 12px;
  width: min(28rem, calc(100% - 6rem));
  overflow: auto;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 12px 16px 20px;
  font-family: Rajdhani, Inter, sans-serif;
}
.limen-book[hidden] { display: none; }
.limen-book h2 { margin: 0 0 8px; font-family: Orbitron, sans-serif; letter-spacing: 0.08em; font-size: 16px; }
.limen-book article { border-top: 1px solid var(--line); padding: 8px 0; }
.limen-book h3 { margin: 0; font-size: 15px; }
.limen-book p { margin: 6px 0 0; font-size: 14px; line-height: 1.4; }
.limen-book .more { margin-top: 6px; color: var(--cyan); background: none; border: 0; padding: 0; cursor: pointer; }

@media (max-width: 1280px) {
  .limen-body { grid-template-columns: 260px minmax(0, 1fr) 340px; }
  .limen-brand img { width: 52px; height: 52px; }
  .limen-brand strong { font-size: 22px; }
  .limen-brand small { letter-spacing: 0.02em; }
  .limen-meta { min-width: 0; font-size: 14px; }
  .limen-find { min-width: 160px; }
}
@media (max-width: 720px) {
  .limen-time { grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }
  .limen-time-expand { width: 88px; height: 88px; }
  .limen-time-expand svg { width: 34px; height: 34px; }
  .limen.is-timefull .limen-time { grid-template-columns: minmax(0, 1fr); }
  .limen.is-timefull .limen-time-side { flex-direction: row; align-items: center; }
  .limen.is-timefull .limen-time-expand { width: 44px; height: 44px; flex: none; }
  .limen.is-timefull .limen-time-expand svg { width: 20px; height: 20px; }
  .limen.is-timefull .limen-time-side { max-height: none; overflow: visible; }
  .limen.is-timefull .limen-time-jumps {
    flex: 1;
    flex-direction: row;
    align-items: center;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 0;
  }
  .limen.is-timefull .limen-time-jumps p { display: none; }
  .limen.is-timefull .limen-time-jumps button {
    width: auto;
    flex: none;
    white-space: nowrap;
    text-align: center;
  }
}
@media (max-width: 980px) {
  .limen { grid-template-rows: auto minmax(0, 1fr) auto; overflow: auto; }
  .limen-body { grid-template-columns: 1fr; }
  .limen-stage { min-height: 420px; }
  .limen-time { height: auto; }
  .limen-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1280px) {
  .limen-top { gap: 8px; padding: 8px 10px; }
  .limen-quick { flex: 1 1 auto; justify-content: flex-start; }
  .limen-find { flex: 1 1 12rem; min-width: 0; max-width: none; }
}
@media (max-width: 720px) {
  .limen-fold-bar {
    display: grid;
    place-items: center;
    width: 100%;
    height: 28px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--cyan);
    font-size: 0;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
  }
  .limen-fold-bar:hover { filter: none; }
  .limen-fold-bar svg { width: 18px; height: 18px; }
  .limen-top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 6px 8px;
  }
  .limen-brand,
  .limen-center,
  .limen-meta { width: 100%; min-width: 0; max-width: none; }
  .limen-brand { gap: 8px; }
  .limen-brand img { width: 28px; height: 28px; }
  .limen-brand strong { font-size: 15px; letter-spacing: 0.1em; }
  .limen-brand span,
  .limen-brand small { display: none; }
  .limen-meta { font-size: 12px; line-height: 1.2; }
  .limen-center { flex: none; flex-direction: column; align-items: stretch; height: auto; }
  .limen-quick { flex: none; width: 100%; justify-content: flex-start; }
  .limen-find { flex: none; width: 100%; height: auto; min-width: 0; max-width: none; }
  .limen-brand, .limen-meta, .limen-fold-bar { flex: none; }
  .limen-top { height: auto; min-height: min-content; overflow: visible; }
  .limen-stage { min-height: 0; }
  .limen-search { height: 36px; }
  .limen-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    text-align: left;
  }
  .limen.is-bar-shut { grid-template-rows: 36px minmax(0, 1fr) auto; }
  .limen.is-bar-shut .limen-top {
    height: 28px;
    min-height: 0;
    padding: 0 8px;
    overflow: hidden;
    justify-content: center;
  }
  .limen.is-bar-shut .limen-brand,
  .limen.is-bar-shut .limen-center,
  .limen.is-bar-shut .limen-meta { display: none; }
  .limen.is-timefull.is-bar-shut { grid-template-rows: minmax(0, 1fr); }
}
