/* ---------- dolní lišta a boční panel ---------- */

.dock {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 18px calc(8px + env(safe-area-inset-bottom));
  z-index: 4;
}
.rail {
  position: absolute;
  z-index: 4;
  left: calc(10px + env(safe-area-inset-left));
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
  max-height: 78%;
  overflow: auto;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }

.pad-btn {
  width: auto;
  min-width: 56px;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--frost);
  border: 0;
  border-radius: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pad-btn img,
.btn-fallback {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 14px;
  background: #0c1410;
  border: 1px solid var(--gold-dim);
  box-shadow: 0 4px 14px #0006;
}
.btn-fallback {
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--gold);
}
.pad-btn.cmd .btn-fallback { color: var(--xp); }
.pad-btn:disabled { opacity: 0.45; }
.pad-btn.current img,
.pad-btn.current .btn-fallback {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 4px 14px #0006;
}
.rail .pad-btn { min-width: 0; }
.rail .pad-btn img,
.rail .btn-fallback { width: 40px; height: 40px; border-radius: 12px; }
.rail .pad-btn span {
  max-width: 62px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}
.dock.busy,
.rail.busy { pointer-events: none; opacity: 0.6; }

/* ---------- modální okna ---------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 8, 0.78);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 30;
}
.modal-card {
  width: min(420px, 100%);
  max-height: 90dvh;
  overflow: auto;
  background: var(--pine);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 18px;
}
.modal-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.modal-card .muted { margin: 0 0 12px; font-size: 14px; }

.switch-row,
.seg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
}
.switch-row input {
  width: 42px;
  height: 24px;
  margin: 0;
  accent-color: var(--gold);
  flex-shrink: 0;
}
.seg {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: #0c1410;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.seg button {
  width: auto;
  margin: 0;
  padding: 6px 11px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.seg button.on {
  background: var(--gold);
  color: #1b140a;
}
